ios - Setting debugger breakpoints across all methods in an Xcode project -


how trace methods invoked across different files in particular user flow ?

putting breakpoints @ different points , observing backtrace not seem efficient way.

instead -

1) put breakpoint across methods in interested project.

2) make breakpoints run debugger command prints out file name , method name.

3) edit breakpoints such program continues execute after breakpoint hit. (this option available when edit particular breakpoint.) don't stop @ breakpoint.

4) disable breakpoints until reach flow need work on.

5) enable breakpoints right before starting flow. approach, don't have manually put breakpoints @ different places understand execution flow. once flow complete, can @ debugger console , figure out execution flow.

now, question - how can using lldb commands? appreciate input/suggestions.

you can't xcode breakpoint interface, in lldb console can do:

(lldb) break set -r . -s appname breakpoint 1: 478 locations. (lldb) br com add enter debugger command(s).  type 'done' end. > bt  > continue  > done (lldb) 

that sets "symbol name match regular expression breakpoint" on names ("." matches everything) in binary/shared library called appname. if leave off -s option, match symbols everywhere. work quite slowly...

the command prints backtrace , continues.

this makes 1 breakpoint, can do:

(lldb) break disable 1 

till need it, , enable with:

(lldb) break enable 1 

if want catch methods, can adjust regular expression, , if find aren't interested in of places hitting, can individually disable locations within breakpoint you've made way.

(lldb) break list 1 

will show locations, and:

(lldb) break disable 1.2-1.10 1.15 

etc. disable locations.

this might little slow, because app starting & stopping time. asking.


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -