DebuggerEventsClass::OnEnterBreakMode Event

 

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

Fired when entering break mode.

Namespace:   EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

public:
event _dispDebuggerEvents_OnEnterBreakModeEventHandler^ OnEnterBreakMode {
	virtual void add(_dispDebuggerEvents_OnEnterBreakModeEventHandler^ value);
	virtual void remove(_dispDebuggerEvents_OnEnterBreakModeEventHandler^ value);
}

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 for more information about break mode.30FC4643-F337-4651-B1FF-F2DE2C098D40

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());
}
Return to top
Show: