I found this post which explains how to setup a conditional breakpoint in order to break on any printf function. What is the procedure to achieve something similar in XCode ? The purpose being obviously the debugger to stop when and where something tries to output anything in the console.
Navigate to a line in your code where you want execution to pause, then click the gutter or line number in the source editor to set a breakpoint. Xcode displays a breakpoint icon to indicate the location. Drag a breakpoint up or down to move it to another location; drag it away from the gutter to remove it.
Step 1 − To add an exception breakpoint, first move to breakpoint navigator in xcode. Step 2 − Click on the + option at the left bottom of the navigator and select Exception breakpoint. Once you select exception breakpoint, it will be added to our code.
You could add a breakpoint in NSLog using lldb console like this:
breakpoint set -n NSLog
You basically have to pause execution, write that command in the console and then resume the execution. For step-by-step instructions and a way to reuse the command have a look here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With