visual studio - .NET equivalent to Delphi's "DebugHook" variable to test for presence of debugger -
when program running under control of debugger in delphi ide, possible detect because variable "debughook" set value <> 0.
is there equally easy way check debugger when debugging .net program in visual studio?
to achieve same in .net reference "system.diagnostics" , add code
if (system.diagnostics.debugger.isattached) // program running under control of debugger
Comments
Post a Comment