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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -