DebuggerEventsClass::OnEnterRunMode Event
Visual Studio 2015
This API supports the product infrastructure and is not intended to be used directly from your code.
Fired when the debugger enters run mode.
Assembly: EnvDTE (in EnvDTE.dll)
public: event _dispDebuggerEvents_OnEnterRunModeEventHandler^ OnEnterRunMode { virtual void add(_dispDebuggerEvents_OnEnterRunModeEventHandler^ value); virtual void remove(_dispDebuggerEvents_OnEnterRunModeEventHandler^ value); }
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."); }
Show: