O'Reilly logo

C# 5.0 Unleashed by Bart De Smet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling the Debugger

Besides the Debug class, the System.Diagnostics namespace has a Debugger class, whose static methods are used to control the debugger. Arguably, the most useful of all its methods is Break, which causes the code to break in the debugger at the point of the call. This functionality is often used to debug a program’s startup path, in cases where it’s rather inconvenient to have a debugger attached already. For example, some other process may launch your program without leaving you a chance to attach a debugger.

Note: Image File Execution Options

In fact, the problem of debugging a startup path has been around since the early days of Windows. It’s not really a problem, though. The designers of the loader that is used to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required