XCode 3.0 debugger console not accepting input

Discussion in 'Mac Programming' started by deanrayj, Jun 5, 2008.

  1. deanrayj macrumors newbie

    Joined:
    Apr 25, 2008
    #1
    I've been using XCode 1.5 to teach myself some simple C++ through the command line utility there. My old laptop had some issues, so I ended up upgrading to a new Intel Mac and installed XCode 3.0. I've found that the XCode 3.0 no longer uses a separate window for the debugging (gcc) console and the command line I/O - it supposedly uses the debugger console window for both, passing input to the console when paused and to the program when running.

    However, I've written a couple of simple programs on the new XCode, and while the window displays all of the output correctly, I can't seem to add any inputs (through cin). When the program prompts me for an input, I type a number and hit return, but the cursor simply jumps to the next line. It doesn't appear to be passing the number through to gcc as a debug prompt, and when I run the program through the debugger, the variable inspector indicates that the number isn't getting through to the variable in the first place.

    I've looked through most of the preferences, tried switching between Release and Debug builds, and I'm not finding any reason that it won't be accepting the user input. Is there something else that I'm missing?
     
  2. toddburch macrumors 6502a

    Joined:
    Dec 4, 2006
    Location:
    Katy, Texas
    #2
    I'm still on Xcode 2.4, and it still has the Debug -> Standard I/O Log. Works great.
     
  3. szymczyk macrumors regular

    Joined:
    Mar 5, 2006
    #3
    Download and install Xcode 2.5 from Apple's developer site. You can run Xcode 2.5 on Leopard along with Xcode 3, and it gives you the Standard I/O Log toddburch mentioned.
     
  4. deanrayj thread starter macrumors newbie

    Joined:
    Apr 25, 2008
  5. szymczyk macrumors regular

    Joined:
    Mar 5, 2006
    #5
    I wish I had a better solution for you. I created a C++ Tool project in Xcode 3 as a test, and I was able to enter input from the debugger console. It just worked for me. I don't know why it doesn't work for you. Installing Xcode 2.5 will get you back programming faster than trying to figure out what you have to do to get command line input to just work for you.
     
  6. TimJF macrumors newbie

    Joined:
    Dec 29, 2007
    #6
     
  7. szymczyk macrumors regular

    Joined:
    Mar 5, 2006
    #7
    Someone emailed me today with a solution. Choosing Run > Sync With Debugger made the console accept input. I can't verify the solution works because the console worked for me, but I figured I should share the solution in case someone searches the forum with a similar problem.
     
  8. toddburch macrumors 6502a

    Joined:
    Dec 4, 2006
    Location:
    Katy, Texas
    #8
    Thanks Mark. I'm getting ready to jump to Leopard... This will help.

    Todd
     

Share This Page