I sometimes use a timer to call System.exit to kill a piece of reset code after a few seconds, which is very useful if it eats a 100% processor and Windows becomes irresponsible because of this. This is very convenient, except when I run it in the debugger. In the debugger, I would like to disable it automatically, otherwise I will forget it, and my debugged process will be killed. Can I find out if a process has been started in the debugger?
Note. I know that I should not use this for something serious. I am not going to.
source
share