DebuggerEventsClass.OnContextChanged Evento

Definição

Acionado sempre que o processo, o programa, o thread ou a pilha atual foram alterados por meio da interface do usuário ou por meio do modelo de automação.

Esta API dá suporte à infraestrutura do produto e não deve ser usada diretamente do seu código.

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

Tipo de evento

_dispDebuggerEvents_OnContextChangedEventHandler

Implementações

Exemplos

O exemplo a seguir demonstra como usar o OnContextChanged evento.

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

Aplica-se a