Xcode 4 - Debug Area no longer shows my console output (NSLog)

感情迁移 提交于 2019-12-17 11:04:52

问题


My NSLog messages no longer show up in my Debug Area. Anyone have an idea how the could have happened?

I can hit command-7 to bring of a list of logs in the left pane, select the latest one and view it in my editor window, but it is extremely annoying compared to having the console output in the debug area.


回答1:


Not sure but may be you have clicked on one of the three buttons at the top right corner of the debug area that are used to either show only variables view, only the console or both.




回答2:


if you want to display Debug area always, then follow these steps:

  • Goto XCode > Preferences > Behaviors > Succeeds >
  • Check checkbox of Show tab named
  • Type DEBUG in the textbox next to Show tab named
  • select separate window in dropdown next to Textbox
  • Now click checkbox before debugger with and select Console View in the dropdown

Now when you will run our app, console window will popout itself.

And shortcut key for this is command+shift+y




回答3:


I had the same issue. Below are fix for this :

  1. You console may be hidden. Press Show the console button present in right corner (blue coloured when console is open).

  2. You may be displaying Debugger or Target output. Select All Output (Checkmark is displayed when selected).

  1. a. Open Xcode preference (shortcut: cmd + ,).

    b. Select Behaviours tab from pop-up.

    c. From the Build sections select Succeeds.

    d. Enable Show debugger with Current Views.

    e. Select Console View from the drop-down list.




回答4:


You have a few choices:

  • In the menus, select View -> Show Debug Area.
  • In the View selection controller in the upper right, enable the bottom view (the one in the middle).
  • If you'd like this to show automatically, go to Preferences -> Behaviors. Select "Run Starts" and enable "Show" Debug Area.



回答5:


For me, the answer is to 'activate console'

Go to view -> Debug Area -> Activate Console




回答6:


For Xcode 8

I set OS_ACTIVITY_MODE to disable to hide crazy logging message in simulator. But it will also hide NSLog output on my iPhone SE device (print function in swift still works). Remove the environment variable makes NSLog work again.




回答7:


Make Sure that in your Debugger Area >> Debugger Bar you have Selected ALL OUTPUT




回答8:


I had an iOS universal app that would show debugger output for the iPhone version, but not for the iPad version.

I looked into editing the schemes ( commandSHIFT, ) and the iPad scheme had a different debugger than the iPhone scheme. I changed the iPad scheme's debugger to match the iPhone's (from LLDB ---> GDB)




回答9:


Took me a while to figure this out... Here's a screenshot of Xcode 6.1.1. Make sure you have chosen All output at 1 and activated the output pane in 2. Somehow the output pane suddenly was gone for me and I just didn't see the icons at the bottom for like 2 hours.




回答10:


Just confirm that you have Xcode open with similar rights as you have the ownership of the files you are trying to build/run and also make sure you have same rights to the build directory. I noticed Xcode won't show any debug output if rights were mismatched. I figured this after facing so much harassment. When this happened, utilities>console was still showing logs. I used that as a workaround.

Mine is: Xcode 4.2 Build 4D199 on OS X 10.7.2




回答11:


If you don't have anything displaying in the logs, the log view will unselect itself and not display itself. You could add a printf and verify this.




回答12:


For me, "Debug Executable" in Scheme Settings (Product-->Scheme-->Edit Scheme: Run) had been unchecked.



来源:https://stackoverflow.com/questions/5697161/xcode-4-debug-area-no-longer-shows-my-console-output-nslog

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!