How to show the Logged Messages window in Xcode

前端 未结 5 1957
梦如初夏
梦如初夏 2020-12-30 03:23

I\'m a very new Cocoa user and running into all sorts of problems...

I\'m trying to get the content of an Array and found this code to do this.

<
相关标签:
5条回答
  • 2020-12-30 04:07

    In later versions of xcode, do shift + cmd + R.

    Or go to View -> Debug Area -> Activate Console

    0 讨论(0)
  • 2020-12-30 04:08

    When Xcode runs your project, the editor changes to show a little black button with the letters "GDB" in it. Click on that to see the Debugger which has the console in it.

    Good luck!

    Oh, and I would read Apple's documentation. It's not that bad.

    0 讨论(0)
  • 2020-12-30 04:10

    In the Xcode menu hit Run - Console. This is where NSLog / print / printf etc statements output.

    The key command is Command + Shift + R.

    The cocoa toString() method is called description as well.

    NSLog(@"array : %@",collection);
    

    Will execute

    NSLog(@"array : %@",[collection description]);
    

    Which will then call description on each of the collections elements.

    0 讨论(0)
  • 2020-12-30 04:15

    From the 'Run' menu, choose 'Console' - keyboard shortcut is Shift-Cmd-R.

    0 讨论(0)
  • 2020-12-30 04:20

    If you want to see it every time you run your application select the "Debugging" tab from the preferences window and change the box that says "On Start" to "Show Console". Additionally i like to check the "Auto Clear Debug Console" checkbox which will clear out the text of the output on starting your application.

    0 讨论(0)
提交回复
热议问题