How can I use DebugBreak() in C#?

I also like to check to see if the debugger is attached – if you call Debugger.Break when there is no debugger, it will prompt the user if they want to attach one. Depending on the behavior you want, you may want to call Debugger.Break() only if (or if not) one is already attached using … Read more