Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug breakpoint in Swift Playground?

I'm trying to add a breakpoint in the line # gutter, but no breakpoint is added when I do this in the playground. Is this possible or is there another way to set breakpoints in the playground?

enter image description here

like image 212
TruMan1 Avatar asked Apr 17 '15 22:04

TruMan1


People also ask

Can we debug in playground?

Handling exceptions. One limitation of both the Xcode and iPad versions of Swift playgrounds is the lack of debugger support.

How do you debug a breakpoint?

To set a breakpoint in source code, click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint. The breakpoint appears as a red dot in the left margin.

How do you add a breakpoint in Swift?

If the thrown error has a helpful error message, that may be enough information to resolve the problem. If not, add a Swift error breakpoint to pause on the line that throws the error. In the Breakpoint navigator, click the Add button (+) in the lower-left corner, and choose Swift Error Breakpoint.

How do I debug in Xcode Swift?

Customize what Xcode displays when running your app in the debugger by choosing Xcode > Preferences > Behaviors > Running. Use the buttons in the debug bar to control the execution of your app. Continue normal execution from the paused position until the app stops at the next breakpoint with the Continue button.


1 Answers

There's no debugger so you can't add any breakpoints.

like image 126
do it better Avatar answered Oct 07 '22 16:10

do it better