0

I searched and I found this question but please don't mark this question as "a duplicate" since that question has three answers: One is using a different tool that apparently is not available anymore (the question is from 2009), the third answer completely misread the question and does not answer it.

So my question is very simple: I have an application that catches (allegedly) when the OS is shutdown). How can I simulate a shutdown so as to debug the application?

KansaiRobot
  • 7,564
  • 11
  • 71
  • 150
  • have you considered executing the shutdown app. `C:\WINDOWS\system32\shutdown.exe` – Jim Feb 14 '18 at 06:26
  • Does it >simulate< the shutdown? (not actually do it) – KansaiRobot Feb 14 '18 at 06:31
  • nah, it will go ahead and do it. you can make it reboot or just log out though... – Jim Feb 14 '18 at 06:34
  • It duplicated with case: https://stackoverflow.com/questions/48763706/how-to-debug-shutdowns-in-visual-studio To simulate OS shutdown, I assume it does not include Visual Studio right(If VS is closed, there is no debugging )? I have an idea which might give you some hints, you get Visual Studio and a virtual machine on your PC, then use VS remote debugging the application that is running on the virtual machine? Then you could just shutdown the virtual machine during debugging. However,the connection between VS and virtual machine might be lost first while virtual machine is shutdown. – Fletcher Feb 14 '18 at 08:32

0 Answers0