Debugger.Break(Boolean) Méthode

Définition

Entraîne la suspension de l'exécution du processus donné afin que son état actuel puisse être analysé.

void Break(bool WaitForBreakMode = true);
[System.Runtime.InteropServices.DispId(7)]
public void Break (bool WaitForBreakMode = true);
[<System.Runtime.InteropServices.DispId(7)>]
abstract member Break : bool -> unit
Public Sub Break (Optional WaitForBreakMode As Boolean = true)

Paramètres

WaitForBreakMode
Boolean

Définissez la valeur true pour effectuer un retour uniquement lorsque le débogueur est passé en mode arrêt. Définissez la valeur false pour arrêter et effectuer un retour immédiatement. Pour plus d'informations, consultez Interruption de l'exécution.

Attributs

Exemples

L'exemple suivant décrit comment utiliser la méthode Break.

public static void Break(DTE dte)  
{  
    // Setup the debug Output window.  
    Window w = (Window)dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);  
    w.Visible = true;  
    OutputWindow ow = (OutputWindow)w.Object;  
    OutputWindowPane owp = ow.OutputWindowPanes.Add("Break Method Test");  
    owp.Activate();  

    dte.Debugger.Break(false);  
    owp.OutputString("The process is paused. Examine the values of variables.");  
}  
Shared Sub Break(ByRef dte As EnvDTE.DTE)  
    dte.Debugger.Break(False)  
    MessageBox.Show("The process is paused. Examine the values of variables.", _  
                    "Debugger Test - Break Test")  
End Sub  

Remarques

Break entraîne la suspension de l’exécution du processus donné afin que son état actuel puisse être analysé.

S’applique à