Is there any way of detecting that a debugger is running in memory?
and here comes the on Form Load pseudocode.
if debugger.IsRunning then
Application.exit
end if
Edit: The original title was "Detecting an in memory debugger"
Is there any way of detecting that a debugger is running in memory?
and here comes the on Form Load pseudocode.
if debugger.IsRunning then
Application.exit
end if
Edit: The original title was "Detecting an in memory debugger"
Two things to keep in mind before using this to close an application running in the debugger:
Now, to be of more use, here's how to use this detection to keep func eval in the debugger from changing your program state if you have a cache a lazily evaluated property for performance reasons.
I've also used this variant at times to ensure my debugger step-through doesn't skip the evaluation:
Try the following