Reputation: 2252
Can anyone know if there is any automated way to add multiple breakpoints in XCode at the same time. In my case I want to add breakpoints in all -viewDidLoad
or -tableView:didSelecRowAtIndexPath:
methods by few clicks not using cmd+shift+F
shortcut and set in in all (tens or even hundreds occurences).
Upvotes: 1
Views: 372
Reputation: 1481
Using lldb
To break on any source code line in current file matching regex:
br se -p 'viewDidLoad'
Use -f
to specify multiple files:
br se -f Foo.m -f Bar.m -f Baz.m -p 'viewDidLoad'
To break on methods or functions in all files matching regex:
br se -r 'view(Did|Will)Appear'
For more info, type help breakpoint set
into the lldb console at the bottom of Xcode. Hope that helps.
Upvotes: 5