Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Project Builder Debugger: viewing variables

Project Builder Debugger: viewing variables
Thread Tools
Junior Member
Join Date: Sep 2000
Status: Offline
Reply With Quote
Apr 18, 2001, 07:34 AM
 
How do I view variables more complicated than ints and Bool while debugging?

I'd like to "see" the contents of NSStrings and other structures.

What's the trick?

Bob

------------------
Bob
-----------
Robert J. Rockefeller
Jackson, Mississippi
"I'm growing older, but not up!"
Bob
-----------
Robert J. Rockefeller
Cincinnati, Ohio
"I'm growing older, but not up!"
     
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status: Offline
Reply With Quote
Apr 18, 2001, 09:22 AM
 
There should be a variable named "self" in the listing. Hit the triangle to open it and you should get all the variables in the class that you are in. As I recall (bear with me I am not at my system right now), you can also hit that triangle to get a drop-down of the value and reference of the variable (it might be in another sub-section called "isa").

Give it a try and tell me if that worked,
Jeff.
Spectral Class
"Shedding Light on Innovation"
     
Grizzled Veteran
Join Date: Apr 2001
Status: Offline
Reply With Quote
Apr 18, 2001, 10:43 AM
 
Currently you have to use the gdb console. (That will change later)

When you're stopped at the breakpoint, you'll see a little console tab at the top - pull that down. That exposes the gdb console.

Then type:

po mystring (or whatever your object name is)

po is short for print-object

You can do all sorts of neat things with the gdb debugger, like when it hits a breakpoint, print the object to a file, then continue running. This would allow you to watch values change through the course of your program, without having to stop and look at them each time. Then you can use tools like grep to search through this huge file, and find out exactly what you're looking for.

That's just a simple example. I'm looking forward to more functionality being exposed in the GUI, but I also like having the power of the command-line gdb available.

Wade

     
Junior Member
Join Date: Sep 2000
Status: Offline
Reply With Quote
Apr 18, 2001, 08:35 PM
 
The po command in GDB does the trick.

I'm more used to, and like better, the very flexible visual debugger in the CodeWarrior IDE. So I'm looking forward to more power in the GUI part of the Project Builder debugger.

Thanks for your help!

Bob

------------------
Bob
-----------
Robert J. Rockefeller
Jackson, Mississippi
"I'm growing older, but not up!"
Bob
-----------
Robert J. Rockefeller
Cincinnati, Ohio
"I'm growing older, but not up!"
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:20 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2