Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to jump to current executing line in XCode debug?

Tags:

xcode

xcode6

I know you can just press "Step Into" to go to the next line and it will automatically take you to that line if you have wandered off, but what if I don't want to skip the currently executing line? Thanks!

like image 294
Marcel Gruber Avatar asked Feb 04 '15 21:02

Marcel Gruber


1 Answers

In the pane on the left hand side (cmd + 0 to show if it's not visible), selected the 6th tab (cmd + 6 to select) which should look like:

Tab icon

In this pane you should now notice that at the bottom there is a list of all the active threads in your application. One (or maybe more) of them will be open showing a stack trace for the thread, like:

Call stack

The top most item in the list is where that thread is currently paused. The line which your breakpoint, is on will be indicated with the breakpoint icon on the left (if you stopped at a breakpoint that is). In the image you can see that I had a breakpoint in -[AppDelegate applicationDidFinishLaunching:]. Simply click on the line of code to jump back to it, you can also easily look back up the call tree to trace bugs from here.

Hope this helps!

like image 199
George Green Avatar answered Oct 03 '22 08:10

George Green