Partager via


DebuggerEventsClass.OnEnterDesignMode Event

Definition

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

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

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

Event Type

Implements

Examples

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

Remarks

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.

Applies to