I have run into a problem where I need to debug my application when a
user logoff. The problem is that Visual Studio is shut down before the
event has been fired to my application. Inserting an assertion in the
program and executing the debugger from the debug assertion alert
message results in a dialog box stating that Visual Studio was unable
to start since the user is logging off.

Any suggestions?