I'm trying to debug my Windows Store App when it gets suspended (trying to prevent my server app from kicking my WSA client when it gets suspended and stops responding to keep-alive messages). But Windows keeps terminating my app almost immediately after it suspends it. Is there a way to prevent Windows from terminating suspended apps? I've searched the interwebs and the group policy editor for such a setting, but the best I can find is a setting to prevent it from auto-terminating apps on shutdown, which doesn't help me. And of course running in the debugger and pressing the Suspend button doesn't help either, since the app doesn't actually get suspended. I guess I could hack in some debug code to make it pretend to be suspended, but I'd prefer not to.
terminating an app ends all processes associated with the app, handy if it gets itself in a knot, it does not remove the app, and the app can be restarted. uninstalling the app will remove it from the device.
Terminating apps should not be confused with uninstalling apps, which could lead to data loss. Terminating an app simply forces the app to start it's lifecycle again and can resolve some issues you may have.
The best way to avoid this random Windows 10 shutdown is to disable Sleep Mode. Head to the Power and sleep settings. Under Sleep, click on the dropdown button for On battery power, PC goes to sleep after and change it to Never.
The command line tool PLMDebug, which is part of the Debugging Tools for Windows package, can be used to exempt an app from the Process Lifetime Management (PLM) policies. When put into debug mode, an app will not be subject to termination and will not be automatically suspended.
Usage:
plmdebug /enableDebug <PackageFullName> [OptionalDebuggerCommandLine]
Once you've exempted it from PLM automatic suspension and termination, you can use /suspend
to force a manual suspension.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With