Can't debug through Simulator

I have downloaded the latest version of XCode and for some reason, my app will not run in any simulator. However, I can get it to run/debug on my iPad device. This was working initially so I'm not sure what happened along the way.


The simulator window does open and it appears that the app installs on the simulator. The initial load-page appears but then the app is closed. If I tap/click the icon on the simulator it will start again but then closes.


I don't see any error in the debugger. Perhaps there is some log file within the simulator setup that I need to look at for errors.


Any ideas on where to start debugging this issue?


Thanks!

Bob

Try looking in ~/Library/Logs/CoreSimulator.


There should be a file called CoreSimulator.log


If that does not help then sort the folders which are named with UUIDs by date. Open the latest folder and click on 'system.log'.


EDIT: To add the info about CoreSimulator.log.

Okay, that brought me to the following error...


<Error>: Unable to load device.plist: /Users/bob/Library/Developer/CoreSimulator/Devices/.dat0b6e.001/device.plist


Any ideas?

I routinely delete everything in ~/Library/Developer/CoreSimulator/Devices/ when both xcode and simulator are not running. That does mean that every once in a while I have to use Xcode and manually add them back, but most times starting Xcode adds them back. If they dont get added back, then go to Xcode -> Window -> Devices and manually add the simulators you want to use.

I tried removing the devices in the folder and re-starting X-Code but still no luck. I had to also go into Developer Tools and then remove and add back in the iPad Air device to the list of simulators. I even tried a full reboot and restart of XCode.


Any other suggestions?

That would have nothing to do with any problems.

If you delete that, make sure that CoreSimulatorService is not running. You'll need to SIGKILL it first. If you remove its state out from under it, you'll certainly have problems.

You should set a breakpoint in your app and step through it to see what is happening.

Well I'm not sure what happened. I took Jeremyhu's advice to step through the debugger. I didn't encounter any errors in Application didFinishLaunchingWithOptions so I let it continue and the app came up in the simulator.


Perhaps clearing out the simulator folder did the trick and I didn't get back to a specific starting point. At any rate, it's working now.


Thanks for all of the help and suggestions.

Can't debug through Simulator
 
 
Q