Difference between Debugger.Launch and Debugger.Break

Reading the documentation, it sounds like Launch does nothing if the debugger is attached - it doesn't actually break (although I haven't verified this).

Break asks to launch the debugger (if not attached), and does do the break.

In reality, it is unlikely you'd have more than one Launch point... if that.


Launch will start a debugger when one is available. But is just ignored if there is none available. Break will crash the program if no debugger is available.


More subtle differences:

  1. If a debugger is already attached, Debugger.Launch is a nop; whereas Debugger.Break will always break into the debugger.

  2. Launching a debugger does not actually break into the debugger. For example, in Visual Studio, Debugger.Launch will attach a debugger to the running process, but then you still need to do a Debug | Break in Visual Studio to actually break under the debugger.