Xcode 4: How do you view the console?

I can’t find a way to start the console (to show NSLog comments) in Xcode 4. The normal method for the previous version of Xcode does not work. Does anyone have an idea on how to do this?

+79
objective-c iphone xcode4
Jul 31 '10 at 7:56
source share
8 answers

You need to click the Log Navigator icon (on the right in the left panel). Then select your Debug / Run session in the left sidebar and you will have a console in the editor area.

enter image description here

+96
Jul 31 2018-10-10T00:
source share

for Xcode 5:

View-> Debug Area-> Console Activation

shift + cmd + c

+18
Feb 06 '14 at 23:03
source share

If you just want to display the log output when the application starts, you can go to the XCode4 → Alerts settings and click on "Launch Start" in the left column.

Then select "Show Debugger", and when you launch the application, the NSLog output will be displayed under the editor panel.

Thus, you do not need to select the up arrow button in the bottom panel.

+14
Jan 14 '11 at 19:21
source share

The console is no longer an additional window, but is located under the text editor. You can set preferences to always show this area. Go to the "General" section "Run Launch" and activate the "Show Debugger". In the "Finish Completion" section, the debugger will be hidden again. You must disable this option. Now the console will remain visible.

EDIT

In the latest release of GM, you can show and hide the console using the button on the toolbar. Very easy.

+8
Aug 05 '10 at 20:55
source share

You can always see the console in another window by opening the Organizer, clicking the Devices tab, selecting your device and selecting its console.

Of course, this does not work for the simulator :(

+4
Nov 12 2018-10-12
source share

Here is an alternative

In Xcode 4, a short cut to show and hide the console is (command-shift-Y) , this will show the console and debugger below ur text edior in the same window.

+4
03 Oct '11 at 7:40
source share

Here is an alternative.

  • In Xcode4, double-click your project (Blueprint icon).
  • Choose a target (gray icon)
  • Select assembly phases (Top Center)
  • Add the “Run Script” assembly step (the “Green Plus” button, bottom right)
  • In the text box below the Shell text box, replace Msgstr "Enter a script or drag and drop the script file from the workspace" using "open $ {TARGET_BUILD_DIR} / $ {TARGET_NAME}"

This will open a terminal window with a command line application running in it.

This is not a great solution, because Xcode 4 still launches and debugs the application no matter what you do in the terminal window that appears.

+2
Sep 20 '10 at 4:19
source share

There are two options:

  • Log navigator (command-7 or view | navigators | log) and select a debugging session.

  • Show | Show Debug Area to view NSLog output and interact with the debugger.

Here is a photo with both on. You would usually not have both, but I can only link one image per message! http://i.stack.imgur.com/4gG4P.png

0
Sep 17 '10 at 6:36
source share



All Articles