How to Turn Off Automatic Termination of Suspended Apps

坚强是说给别人听的谎言 提交于 2019-12-06 05:38:33

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/19459892/how-to-turn-off-automatic-termination-of-suspended-apps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!