Share via


DebuggerEventsClass.OnEnterRunMode Event

Definition

Fired when the debugger enters run mode.

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

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

Event Type

Implements

Examples

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.");  
}  

Remarks

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.

Applies to