• Answers
  • Web
Answer 2 out of 2
 
207 helpful answers

They're coming to take me away, Ha-haaa!

Advanced .NET Debugging Blog

My personal blog

A:

As far as I know you cannot know if a process has a debugger attached to it outside of the process itself. In .NET you can, however, check on your current process if it is attached to a debugger or not using the "Debugger.IsAttached" property located in System.Diagnostics. 

You can then use the the following code to kill your process:

Process.GetCurrentProcess().Kill();

To kill the current process. 

 

Posted 2 years ago
Eran was invited by Yedda to answer this question.

Helpful?(1)
Rated as Best Answer
 
Comment About This Answer (or add your own answer)

Feed - Subscribe to changes to this Q&A Blog
ADVERTISEMENT
  • Answers
  • Web
Copyright © 2006-2009, Yedda Inc. and respective copyright owners