If no debugger is attached, users are asked if they want to attach a debugger. If users say yes, the debugger is started. If a debugger is attached, the debugger is signaled with a user breakpoint event, and the debugger suspends execution of the process just as if a debugger breakpoint had been hit.

Advertencia

Starting with net_v40_long, the runtime no longer exercises tight control of launching the debugger for the M:System.Diagnostics.Debugger.Break method, but instead reports an error to the Windows Error Reporting (WER) subsystem. WER provides many settings to customize the problem reporting experience, so a lot of factors will influence the way WER responds to an error such as operating system version, process, session, user, machine and domain. If you're having unexpected results when calling the M:System.Diagnostics.Debugger.Break method, check the WER settings on your machine. For more information on how to customize WER, see WER Settingshttps://msdn.microsoft.com/library/windows/desktop/bb513638.aspx. If you want to ensure the debugger is launched regardless of the WER settings, be sure to call the M:System.Diagnostics.Debugger.Launch method instead.