Mac XCODE 4 & viewing global variables

hajiman

macrumors newbie
Original poster
Feb 2, 2011
10
0
I am a little embarrassed that after several hours of searching I couldn't find the answer to such a simple task - how to view global variables in XCODE 4. I had no problems viewing globals in XCODE 3 but can't seem to find a way in XCODE 4.
I am running a Console application and am developing in C/C++. I am enclosing a snapshot of my XCODE project and a sample file/globals I am trying to inspect.
How do I display the contents of any of the globals shown in the serial_utils.cpp window? (e.g. GPS_COMM_PORT)
 

Attachments

szymczyk

macrumors regular
Mar 5, 2006
171
8
Looking at your screenshot, you're not doing anything wrong. Selecting All from the menu at the top of the variables view should show the global variables. I tested using global variables in a command-line C++ project and they didn't show up for me with GDB. Switching to LLDB made the global variables appear in the variables view. Use the scheme editor to change the debugger. Choose Edit Scheme from the Scheme pop-up menu in the project window toolbar to open the scheme editor. Select the Run step in the scheme editor to change the debugger.

If switching to LLDB doesn't work, ask your question on Apple's Xcode mailing list. If they don't have a solution, file a bug report with Apple.
 
Comment

hajiman

macrumors newbie
Original poster
Feb 2, 2011
10
0
Thanks for the suggestion. I tried switching over to LLDB but still am not able to view global variables. I am glad I am not the only one experiencing this problem. I'll try the xcode mailing list.
 
Comment

Similar threads

  • wlisik
14
Replies
14
Views
2K
  • jasnw
2
Replies
2
Views
854
  • gimmesomemo
1
Replies
1
Views
661
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.