DebuggerEventsClass.OnEnterRunMode Event


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

Fired when the debugger enters run mode.

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

public virtual event _dispDebuggerEvents_OnEnterRunModeEventHandler OnEnterRunMode

Reflecting the overall state of the debugger, this event is fired when the debugger enters run mode. This event may not fire when stepping through code. Typically, it is best used when updating the user interface. See the CurrentMode property for more information.

The following example demonstrates how to use the OnEnterRunMode event.

// Place the following code in the event handler
EnvDTE.DebuggerEvents debugEvents = applicationObject.Events.DebuggerEvents;
debugEvents.OnEnterRunMode += 
new _dispDebuggerEvents_OnEnterRunModeEventHandler(DebuggerEvents.RunHandler);

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

// OnEnterRunMode Event.
public static void RunHandler(dbgEventReason reason)
    System.Windows.Forms.MessageBox.Show("Debugger enters run mode.");
Return to top