I am a seasoned Visual Studio programmer, and when I set a breakpoint, I can open an intermediate window and type ?variableName to view the current value of the variable.
In Xcode however, I can’t seem to find an equivalent. I can hover over the variable name when stepping through the code, but long strings are truncated in the view.
Is there an Xcode equivalent to the intermediate window of Visual Studio? If not, how can I set a breakpoint and watch the value (the full value in the case of longer strings)?
Many thanks,
Brett
Use the console window (under the Run menu – choose “Show console”) and then it’s a gdb debugger. Then you can issue:
Another way is to hover over the variable, right-click (or [Ctrl]+[left-click]) and choose “Print Description”. The output will be sent to the gdb console.