Xcode 4.2 jumps to main.m every time after stopping simulator

后端 未结 11 1286
感情败类
感情败类 2020-12-04 09:28

This is more of a general annoyance. Every time after stopping the simulator, Xcode jumps to main.m for some reason. On the left nav, it jumps to the Debug Navigator.

<
相关标签:
11条回答
  • 2020-12-04 10:28

    Xcode -> Preferences

    Under Behaviors

    Click on Run Starts

    Checkbox for [Show] debugger with [Current Views]

    ...worked for me.

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

    Go to Preferences -> Behaviors. Choose "Run Completes" in the left hand side. Check the box next to "Show Tab" and enter a tab name. I use "Edit". This way whenever you stop, you will always be back at a tab called Edit.

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

    None of the other solutions listed were suitable for me, so I made a macro (using an external hotkey utility).

    (wait 0.1 second after each step)

    command-period

    command-1

    down arrow

    up arrow

    command-j

    enter

    Use this key instead of the normal stop, and you end up with your cursor positioned where you left it. Very nice.

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

    I had the same problem and it WAS really annoying, especially when you were in the middle of debugging, stopping/launching the app several times in a row after small modifications.

    Everything is solvable through settings in Xcode user preferences:

    • Just go to "run completes"
    • There find the "Show" line and click the checkbox
    • On the same line modify target to go to "Current" in the dropdown menu.

    There you go. Xcode will not move your editing view from now on. Enjoy.

    PS: Xcode version 4.2 Build 4C199

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

    I was trying to find the offending line when my code was breaking, so what I did was:

    1. Go to where you define your breakpoints (breakpoint navigator, according to the documentation)
    2. Click in the "+" sign in the left bottom corner of the navigation area
    3. Click on Add Exception breakpoint
    4. You click Done
    5. Run your app

    Xcode shows you the offending line.

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