DebuggerEventsClass.OnEnterDesignMode Event

 

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

Fired when leaving run mode or debug mode, and when the debugger establishes design mode after debugging.

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

public virtual event _dispDebuggerEvents_OnEnterDesignModeEventHandler OnEnterDesignMode

Reflecting the overall state of the debugger, this event is fired when the debugger leaves run mode or debug mode. This event is fired whenever the debugger establishes design mode after debugging. See the CurrentMode property for more information.

The following example demonstrates how to use the OnEnterDesignMode event.

//Place the following code in the event handler
EnvDTE.DebuggerEvents debugEvents = applicationObject.Events.DebuggerEvents;
debugEvents.OnEnterDesignMode += 
new _dispDebuggerEvents_OnEnterDesignModeEventHandler(DebuggerEvents.DesignHandler);

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

// OnEnterDesignMode Event.
public static void DesignHandler(dbgEventReason reason)
{
    System.Windows.Forms.MessageBox.Show("Debugger enters design mode.");
}
Return to top
Show: