The data breakpoints in Visual Studio is very a very useful debugging tool and I need something like that for my current iPad project (pointers and memory acting strange).
Is it possible to create data breakpoints in Xcode?
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.
Set breakpoints in source code To set a breakpoint in source code, click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint.
Symbolic breakpoints are breakpoints that will trigger on certain conditions. How to do that? Navigate to the second last tab on the left panel with a breakpoint picture. Click the “+” icon at the lower left of the Breakpoint Navigator and select Symbolic Breakpoint.
You can set a conditional break point in Xcode by setting the breakpoint normally, then control-click on it and select Edit Breakpoint (choose Run -> Show -> Breakpoints). In the breakpoint entry, there is a Condition column. Now, there are several issues to keep in mind for the condition.
Here is the documentation for the Watchpoint in Xcode :
To monitor changes to the value of variables or data items, you can set watchpoints. A watchpoint pauses execution of the program whenever the value of the watched item changes. You can set a watchpoint on a variable only when execution of the program is halted. To set a watchpoint on a variable:
With execution of the program paused at a breakpoint, select the variable in the Variable list in the Debugger window. See “Debugging in the Debugger” to learn more about the Variable list. Choose one of the following: Run > Variables View > Watch Variable Watch Variable from the variable list shortcut menu Xcode displays a magnifying glass next to the variable to indicate that the variable is being watched, as shown in Figure 7-5. Figure 7-5 Watched variable in the Variable list
When the value of the variable changes, Xcode pauses execution of the program and displays a dialog showing the location of the program counter and the new value of the variable. If execution of the program moves beyond the scope of the current variable, Xcode deletes the watchpoint and pauses execution of the program.
Important: Watching local variables, located on the stack, can cause your program to crash if system calls are made in the current function.
I'm not familiar with Visual Studio but I guess you're looking for watchpoints. Search for "watchpoint" in the Xcode Debugging Guide.
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