Xcode4: Debugger - how do you view class members?
Hi, I have a breakpoint. I can see the contents of local variables when I hover the cursor over the variable names, but for some reason I cannot do the same with class member variables.
Is this just not possible within Xcode or do you have to enable something?
I don't really want to resort to logging values with NSLog etc.
I'm using C++, whether that makes any difference or not?
Is this just not possible within Xcode or do you have to enable something?
I don't really want to resort to logging values with NSLog etc.
I'm using C++, whether that makes any difference or not?
you can type "p whatever" into the GDB console if all else fails.
Cool! Thanks once again Cookie! :-)
(Apr 13, 2011 11:56 AM)OneSadCookie Wrote: you can type "p whatever" into the GDB console if all else fails.
I've just had a case where this doesn't work:
Code:
(gdb) p m_CursorRow
current stack frame does not contain a variable named `self'Whats going on here?

Oh.. I just found it - I have to manually change the stack content.. Hmm.. I guess I'm so used to MS Visual Studio doing everything for me.
You can also inspect 'self' inside the "Local" debug window and dig down, where you can inspect the value of member variables. It can be a bit of a pain with classes that have lots of parent classes though.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Xcode4: Resource not in Documents folder? | SparkyNZ | 3 | 5,575 |
Apr 9, 2011 03:29 PM Last Post: SparkyNZ |
|
| XCode combining debugger and console?? | Toontingy | 2 | 4,675 |
Feb 16, 2010 07:55 PM Last Post: Toontingy |
|
| iPhone application always opens with the debugger! | frogameleon | 0 | 2,251 |
Mar 6, 2009 10:02 AM Last Post: frogameleon |
|
| using the xcode debugger | NSDuo | 8 | 5,212 |
Jan 14, 2009 04:52 PM Last Post: NSDuo |
|
| Xcode debugger and C++ global/file scope variables. | WhatMeWorry | 2 | 4,384 |
Sep 9, 2005 12:34 AM Last Post: WhatMeWorry |
|

