When debugging, you'll need to use the Suspend, Resume, and Suspend and Shutdown on the Debug Location toolbar within Visual Studio to test your application's response to those events. I find it easier to do so when running in the simulator.
You can read more about it here and you might also take a look at more information like this available from the App Builder program.