I have written my first Hello World Objective C program. How do I add a breakpoint and inspect a variable? I can see a Breakpoints button but can't insert one.
- 7Shortcut: Insert cursor on the line you want, then hit "Command + \".EmptyStack– EmptyStack2011-02-08 10:40:05 +00:00Commented Feb 8, 2011 at 10:40
- Or just click in the left edge window border next to the required line.Paul R– Paul R2011-02-08 10:52:21 +00:00Commented Feb 8, 2011 at 10:52
- As I just learned from the docs I linked, the edge is called Guttervikingosegundo– vikingosegundo2011-02-08 10:58:08 +00:00Commented Feb 8, 2011 at 10:58
- Is there a keyboard shortcut that works on a non-english keyboard?neoneye– neoneye2021-12-14 09:37:40 +00:00Commented Dec 14, 2021 at 9:37
Add a comment |
4 Answers
You don't need to right click or any such thing. To enable the breakpoints in your code all you have to do is click on a particular line number. You'll get a breakpoint symbol in your code there.
You can add multiple breakpoints to your code. The breakpoints button on top is used to put all your breakpoints ON (during debugging) or OFF (when necessary)
I'll be addressing a section on breakpoints in my blog ( http://techtalktone.wordpress.com ) soon.
Hope this helps :D
Comments
Maybe this is useful for you: Xcode Debugging Guide 
1 Comment
vikingosegundo
enabling line numbers shouldn't be necessary