Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move execution point in Xcode/lldb

Tags:

xcode

ios

lldb

Is there a way to set the execution point while debugging Xcode/lldb? To be more specific, after hitting a breakpoint, moving the execution point manually to another line of code?

like image 824
Ken Avatar asked Jul 11 '13 15:07

Ken


2 Answers

If you're looking at moving it up or down with in a method you can click and drag the green arrow to a specific point. so if you want to back up a line before the breakpoint. click on the green arrow that is produced and drag it up. If you hit run you'll hit your breakpoint again

like image 171
Chip Snyder Avatar answered Oct 09 '22 16:10

Chip Snyder


In Xcode 6, you can use j lineNumber - see documentation below:

(lldb) help j
     Sets the program counter to a new address.  This command takes 'raw' input
     (no need to quote stuff).

Syntax: _regexp-jump [<line>]
_regexp-jump [<+-lineoffset>]
_regexp-jump [<file>:<line>]
_regexp-jump [*<addr>]


'j' is an abbreviation for '_regexp-jump'
like image 28
Zorayr Avatar answered Oct 09 '22 15:10

Zorayr