Compartir a través de


DebuggerEventsClass.OnEnterBreakMode Event

Definition

Fired when entering break mode.

This API supports the product infrastructure and is not intended to be used directly from your code.

public:
 virtual event EnvDTE::_dispDebuggerEvents_OnEnterBreakModeEventHandler ^ OnEnterBreakMode;
public:
 virtual event EnvDTE::_dispDebuggerEvents_OnEnterBreakModeEventHandler ^ OnEnterBreakMode;
public virtual event EnvDTE._dispDebuggerEvents_OnEnterBreakModeEventHandler OnEnterBreakMode;
member this.OnEnterBreakMode : EnvDTE._dispDebuggerEvents_OnEnterBreakModeEventHandler 
Public Overridable Custom Event OnEnterBreakMode As _dispDebuggerEvents_OnEnterBreakModeEventHandler Implements OnEnterBreakMode

Event Type

Implements

Examples

The following example demonstrates how to use the OnEnterBreakMode event.

// Place the following code in the event handler  
EnvDTE.DebuggerEvents debugEvents = applicationObject.Events.DebuggerEvents;  
debugEvents.OnEnterBreakMode +=   
new _dispDebuggerEvents_OnEnterBreakModeEventHandler(DebuggerEvents.BreakHandler);  

// add the following Event handler code   
public static void StartEvents(DTE dte)  
{  
    System.Windows.Forms.MessageBox.Show("Events are attached.");  
}  

// OnEnterBreakMode Event.  
public static void BreakHandler(dbgEventReason reason, ref dbgExecutionAction execAction)  
{  
    System.Windows.Forms.MessageBox.Show("Debugger enters break mode. " +   
                                         "Reason: " + reason.ToString());  
}  

Remarks

Reflecting the overall state of the debugger, this event is fired when the debugger enters break mode. This event is fired regardless of how break mode is established.

See CurrentMode property and Breaking Execution for more information about break mode.

Applies to