Is there a way to detect if a debugger is attached to another process from C#?

前端 未结 5 1129
无人及你
无人及你 2020-11-29 03:08

I have a program that Process.Start() another program, and it shuts it down after N seconds.

Sometimes I choose to attach a debugger to the started pro

5条回答
  •  南笙
    南笙 (楼主)
    2020-11-29 04:01

    The solution for me is Debugger.IsAttached as described here: http://www.fmsinc.com/free/NewTips/NET/NETtip32.asp

提交回复
热议问题