DebuggerEventsClass.OnContextChanged Event

 

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

Fired whenever the current process, program, thread, or stack has been changed through the user interface or through the automation model.

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

public virtual event _dispDebuggerEvents_OnContextChangedEventHandler OnContextChanged

The following example demonstrates how to use the OnContextChanged event.

// Place the following code in the event handler
EnvDTE.DebuggerEvents debugEvents = applicationObject.Events.DebuggerEvents;
debugEvents.OnContextChanged += 
new _dispDebuggerEvents_OnContextChangedEventHandler(DebuggerEvents.ContextHandler);

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

public static void ContextHandler(EnvDTE.Process newProc, 
    EnvDTE.Program newProg, EnvDTE.Thread newThread, EnvDTE.StackFrame newStkFrame)
{
    System.Windows.Forms.MessageBox.Show("Debugger enters context changed mode.");
}
Return to top
Show: