Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

New to XCode, is there a VisualStudio style immediate window?

rraaggrraagg Posts: 163Registered Users
edited January 2011 in Mac OS X Development
New to XCode, is there a VisualStudio style immediate window?
i.e when I've stopped on a breakpoint in debug mode, A place where i could type variable name and it gives me the value, for e.g.

? Person.Name
"Smith"

I have noticed you can hover over objects but I still cant see the values in NSString and NSDate objects I can only see loads of crap about unicode etc!

Hope someone can help.

Thanks in advance :-)
Post edited by rraagg on

Replies

  • ldv75ldv75 Posts: 27Registered Users
    edited September 2009
    rraagg wrote: »
    New to XCode, is there a VisualStudio style immediate window?
    i.e when I've stopped on a breakpoint in debug mode, A place where i could type variable name and it gives me the value, for e.g.

    ? Person.Name
    "Smith"

    I have noticed you can hover over objects but I still cant see the values in NSString and NSDate objects I can only see loads of crap about unicode etc!

    Hope someone can help.

    Thanks in advance :-)

    so far i'm missing this too. I ddn't find anything similar

    waiting for help
    My Apps:<br />
    <br />
    On iTunes:<br />
    -<a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=335486234&mt=8&s=143441"; target="_blank">iSuperBall!!</a>: winning
  • CaptainCodeCaptainCode Posts: 91Registered Users
    edited September 2009
    rraagg wrote: »
    New to XCode, is there a VisualStudio style immediate window?
    i.e when I've stopped on a breakpoint in debug mode, A place where i could type variable name and it gives me the value, for e.g.

    ? Person.Name
    "Smith"

    I have noticed you can hover over objects but I still cant see the values in NSString and NSDate objects I can only see loads of crap about unicode etc!

    Hope someone can help.

    Thanks in advance :-)

    In the debugger window you can type in any valid code.
    To print out a variable type
    po varName
    It works for most things
  • desijattnzdesijattnz Posts: 4New Users
    edited September 2009
    I don't think there a a gui, but make yourself familiar with gdb! Thats the beast you need to learn how to tame! Once you got that, you'll know what to do! :)
  • rraaggrraagg Posts: 163Registered Users
    edited September 2009
    desijattnz wrote: »
    I don't think there a a gui, but make yourself familiar with gdb! Thats the beast you need to learn how to tame! Once you got that, you'll know what to do! :)

    Yeah will start looking into that.
    nice tag man
    Sasriakal!
  • desijattnzdesijattnz Posts: 4New Users
    edited September 2009
    rraagg wrote: »
    Sasriakal!

    It's actually, Sat Sri Akal ;);)

    Thanks!
  • Ironman_EIronman_E Posts: 1New Users
    edited January 2011
    rraagg wrote: »
    New to XCode, is there a VisualStudio style immediate window?
    i.e when I've stopped on a breakpoint in debug mode, A place where i could type variable name and it gives me the value, for e.g.

    ? Person.Name
    "Smith"

    I have noticed you can hover over objects but I still cant see the values in NSString and NSDate objects I can only see loads of crap about unicode etc!

    Hope someone can help.

    Thanks in advance :-)

    When running your code, stop at a breakpoint and go to Run->Show->Expressions...

    You can use Run->Debugger to see the local variables or jump out or deep into your code. Wherever you are you can see the local variables and use Expressions to variable values.

    Both are very useful tools and provide you with more confidence in your code.
  • yamanwayamanwa JordanPosts: 1New Users Noob
    Use the console window, if you have a variable x and want to know the value
    write the following line

    type x

    good luck
Sign In or Register to comment.