Xcode debugger stops using the SIGKILL on Stop button

I am using Xcode 4.2 for MacOS Lion. When debugging an iPhone / iPad application in Simulator, I use the Stop button on the Xcode toolbar (Product | Stop) to exit the application. Very often, after this, Xcode opens the main.m file, places the execution pointer on the UIApplicationMain call, and says: "Program received by SIGKILL." About a second after that, it disables debugging mode, so I cannot debug this error. My application includes many threads, so I think it could be about fetching resources when the threads are still running, or something like that. It might even be normal, and I don’t care what the problem is about, because the application still terminates. But, seeing this SIGKILL after each debugging is really annoying. How can I debug it? Alternatively, is there a way to disable it?

EDIT: there is nothing in the console except a normal activity log (without alarm data, for example, with regular exceptions).

+4
objective-c xcode
Oct 26 '11 at 10:09
source share
5 answers

SIGKILL is what you send to the process when you stop the debugger. There is nothing wrong, but sometimes it appears and switches you to the main.m file, which is useless and annoying.

To get around this, don't worry about stopping the executable from Xcode. Just leave it to work, and when you want to start it again, just restart the Play button and the previous task will be terminated anyway.

+6
Oct 26 '11 at 10:16
source share

It seems to me that the jrturton solution does not really address the problem. I specifically stop the application, so I can check the data storage using NSUserDefaults.

My suggestion is to press STOP immediately after launch so that the debugger no longer tracks the application. You can then close the application and reopen it at your discretion. By doing this, I was able to verify that NSUserDefaults was saved correctly without having to go through the debugger every time I killed and reopened the application.

+1
Aug 17 2018-12-12T00:
source share

To avoid a short stop of Xcode 4 and switching to main.m, you can disable the debugging mode (?) By clicking the Breakpoints button before clicking the Stop button.

0
Nov 01 '11 at 18:05
source share

If you prefer to stop your application while editing the code, you can try my answer given here:

Xcode 4.2 goes to main.m every time after stopping the simulator

0
Nov 09 '11 at 16:05
source share

If you use a trackpad, one way is to swipe left in the editor area. This will move main.c and open the previously edited file.

0
Feb 05 '12 at 11:22
source share



All Articles