Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Turn Off Automatic Termination of Suspended Apps

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.

like image 313
mkelly4ca Avatar asked Oct 18 '13 22:10

mkelly4ca


People also ask

What does terminate this app mean?

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.

Does terminating an app uninstall it?

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.

How do I stop Windows from shutting down automatically?

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.


1 Answers

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.

like image 128
Raymond Chen Avatar answered Oct 11 '22 10:10

Raymond Chen