Xcode 4: How do you view the console?

前端 未结 8 944
别跟我提以往
别跟我提以往 2020-12-02 16:14

I can\'t seem to find a way to have the console run (to show NSLog comments) in XCode 4. The normal method for the previous version of XCode does not work. Does anyone have

8条回答
  •  猫巷女王i
    2020-12-02 16:56

    Here's an alternative.

    1. In XCode4 double-click your Project (Blueprint Icon).
    2. Select the Target (Gray Icon)
    3. Select the Build Phases (Top Center)
    4. Add Build Phase "Run Script" (Green Plus Button, bottom right)
    5. In the textbox below the Shell textfield replace "Type a script or drag a script file from your workspace" with "open ${TARGET_BUILD_DIR}/${TARGET_NAME}"

    This will open a terminal window with your command-line app running in it.

    This is not a great solution because XCode 4 still runs and debugs the app independently of what you're doing in the terminal window that pops up.

提交回复
热议问题