DkmProcess.AddExceptionTrigger Method

Definition

Overloads

AddExceptionTrigger(Guid, DkmExceptionTrigger)

Adds an exception trigger so that ExceptionTriggerHit events will be sent when the exception trigger has been met.

If there is already an exception triggered defined for this {SourceId, DkmExceptionTrigger} tuple then the existing trigger will be modified with the new settings. For example, if a component defines a trigger to stop when an access violation exception is thrown and later sets a trigger to fire when any Win32 exception goes unhandled, then the access violation trigger will be removed.

AddExceptionTrigger(DkmWorkList, Guid, DkmExceptionTrigger, DkmCompletionRoutine<DkmAddExceptionTriggerAsyncResult>)

Adds an exception trigger so that ExceptionTriggerHit events will be sent when the exception trigger has been met.

If there is already an exception triggered defined for this {SourceId, DkmExceptionTrigger} tuple then the existing trigger will be modified with the new settings. For example, if a component defines a trigger to stop when an access violation exception is thrown and later sets a trigger to fire when any Win32 exception goes unhandled, then the access violation trigger will be removed.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

AddExceptionTrigger(Guid, DkmExceptionTrigger)

Adds an exception trigger so that ExceptionTriggerHit events will be sent when the exception trigger has been met.

If there is already an exception triggered defined for this {SourceId, DkmExceptionTrigger} tuple then the existing trigger will be modified with the new settings. For example, if a component defines a trigger to stop when an access violation exception is thrown and later sets a trigger to fire when any Win32 exception goes unhandled, then the access violation trigger will be removed.

public:
 void AddExceptionTrigger(Guid SourceId, Microsoft::VisualStudio::Debugger::Exceptions::DkmExceptionTrigger ^ Trigger);
public void AddExceptionTrigger (Guid SourceId, Microsoft.VisualStudio.Debugger.Exceptions.DkmExceptionTrigger Trigger);
member this.AddExceptionTrigger : Guid * Microsoft.VisualStudio.Debugger.Exceptions.DkmExceptionTrigger -> unit
Public Sub AddExceptionTrigger (SourceId As Guid, Trigger As DkmExceptionTrigger)

Parameters

SourceId
Guid

[In] Identifies the source of an object. SourceIds are used to enable filtering in scenarios when multiple components may be creating instances of a class. For example, source ids can be used to determine if a breakpoint comes from the AD7 AL (ex: user breakpoint, or other breakpoint visible at the SDM level) instead of a breakpoint which may be created by another component (for example an internal breakpoint used for stepping).

Trigger
DkmExceptionTrigger

[In] Describes an exception or collection of exceptions which a component wants to break on. When a higher level components wants to be notified about certain exceptions, it should create one or more exception triggers, and then enable these triggers (DkmProcess.EnableExceptionTriggers). After this, when the exception occurs, a ExceptionTriggerHit exception will be fired whenever this trigger is met.

Applies to

AddExceptionTrigger(DkmWorkList, Guid, DkmExceptionTrigger, DkmCompletionRoutine<DkmAddExceptionTriggerAsyncResult>)

Adds an exception trigger so that ExceptionTriggerHit events will be sent when the exception trigger has been met.

If there is already an exception triggered defined for this {SourceId, DkmExceptionTrigger} tuple then the existing trigger will be modified with the new settings. For example, if a component defines a trigger to stop when an access violation exception is thrown and later sets a trigger to fire when any Win32 exception goes unhandled, then the access violation trigger will be removed.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

public:
 void AddExceptionTrigger(Microsoft::VisualStudio::Debugger::DkmWorkList ^ WorkList, Guid SourceId, Microsoft::VisualStudio::Debugger::Exceptions::DkmExceptionTrigger ^ Trigger, Microsoft::VisualStudio::Debugger::DkmCompletionRoutine<Microsoft::VisualStudio::Debugger::Exceptions::DkmAddExceptionTriggerAsyncResult> ^ CompletionRoutine);
public void AddExceptionTrigger (Microsoft.VisualStudio.Debugger.DkmWorkList WorkList, Guid SourceId, Microsoft.VisualStudio.Debugger.Exceptions.DkmExceptionTrigger Trigger, Microsoft.VisualStudio.Debugger.DkmCompletionRoutine<Microsoft.VisualStudio.Debugger.Exceptions.DkmAddExceptionTriggerAsyncResult> CompletionRoutine);
member this.AddExceptionTrigger : Microsoft.VisualStudio.Debugger.DkmWorkList * Guid * Microsoft.VisualStudio.Debugger.Exceptions.DkmExceptionTrigger * Microsoft.VisualStudio.Debugger.DkmCompletionRoutine<Microsoft.VisualStudio.Debugger.Exceptions.DkmAddExceptionTriggerAsyncResult> -> unit
Public Sub AddExceptionTrigger (WorkList As DkmWorkList, SourceId As Guid, Trigger As DkmExceptionTrigger, CompletionRoutine As DkmCompletionRoutine(Of DkmAddExceptionTriggerAsyncResult))

Parameters

WorkList
DkmWorkList

WorkList to append the new work item to.

SourceId
Guid

[In] Identifies the source of an object. SourceIds are used to enable filtering in scenarios when multiple components may be creating instances of a class. For example, source ids can be used to determine if a breakpoint comes from the AD7 AL (ex: user breakpoint, or other breakpoint visible at the SDM level) instead of a breakpoint which may be created by another component (for example an internal breakpoint used for stepping).

Trigger
DkmExceptionTrigger

[In] Describes an exception or collection of exceptions which a component wants to break on. When a higher level components wants to be notified about certain exceptions, it should create one or more exception triggers, and then enable these triggers (DkmProcess.EnableExceptionTriggers). After this, when the exception occurs, a ExceptionTriggerHit exception will be fired whenever this trigger is met.

CompletionRoutine
DkmCompletionRoutine<DkmAddExceptionTriggerAsyncResult>

Routine to fire when the request is complete. If the request is successfully appended to the work list, this will always fire (including when the operation is canceled). This will never fire if appending the work item fails.

Applies to