开发者

How to prevent Xcode 4 from jumping to the main.m file after every Run?

Every time I hit cmd+R it jumps the editor window to the main.m and highlights this for a fraction of a second:

int retVal = UIApplicationMain(argc, argv, nil, nil);

Breakpoints dis开发者_如何学Goabled. It's very annoying. Any way to stop this?


Usually this happens to me when I have a breakpoint at a position that no longer exists (code deleted i.e). GDB stops at the beginning of the program, if it finds an invalid breakpoint.

This seems to cause the switching to main.m on xcode's part.

Most often I delete all my breakpoints and start over setting the ones I really need. They tend to pile up anyway. This fixes the issue for me.


Probably, it is not the program being run, but being stopped that is causing the highlight. When you hit cmd+R while the debugged program is still running (even in the background), Xcode will stop it using the SIGKILL signal before running a new instance.

What is new in Xcode 4, is that it catches the SIGKILL and will display where it happened - which it traces down to main.m. This annoyance has not been properly solved yet. My answer has worked for me (except in one single freak case), but not for others:

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

In any case, you should file a bug with Apple because Xcode 3 used to ignore this.


Do you happen to have a custom behavior defined in Preferences > Behaviors? This is about the only thing I can think of that'd be responsible.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜