We are trying to develop an app for Windows Mobile and are running into issues with debugging what happens after the device wakes up from sleep. When the device sleeps the debugger disconnects, so we can't debug the wake up event. Is there a way to make VS not disconnect? Or a way to reestablish a connection when the device is woken?
+2
A:
Nope, there's no way to do this. Even from an OS perspective, wake up is one of the hardwest things to debug, and there you typically use a JTAG debugger. Your only real option is loads of logging.
ctacke
2009-04-09 20:54:00
A:
I might get hated on for this one, but what about a Sleep(30 * 1000)
right before the troublesome code? (Assuming you're writing a normal user-level app.) 30 seconds should be enough time to connect and attach the debugger to your process so you can debug.
zildjohn01
2009-04-09 21:47:10