DkmPendingBreakpoint Class

Definition

High level breakpoint object which is tied to a user-level construct (ex: source file, function name) which may map to zero or more code-level constructs (DkmBoundBreakpoint) and which may be tracked over time.

Derived classes: DkmPendingAddressBreakpoint, DkmPendingAddressNameBreakpoint, DkmPendingDataBreakpoint, DkmPendingFileLineBreakpoint, DkmPendingFunctionBreakpoint

public ref class DkmPendingBreakpoint abstract : Microsoft::VisualStudio::Debugger::DkmDataContainer, IDisposable
[System.Runtime.InteropServices.Guid("c9e1ffa4-f943-14bc-5566-00a802dfc66f")]
public abstract class DkmPendingBreakpoint : Microsoft.VisualStudio.Debugger.DkmDataContainer, IDisposable
[<System.Runtime.InteropServices.Guid("c9e1ffa4-f943-14bc-5566-00a802dfc66f")>]
type DkmPendingBreakpoint = class
    inherit DkmDataContainer
    interface IDisposable
Public MustInherit Class DkmPendingBreakpoint
Inherits DkmDataContainer
Implements IDisposable
Inheritance
DkmPendingBreakpoint
Derived
Attributes
Implements

Properties

CompilerId

Identifies the source language (ex: C#) and compiler vendor (ex: Microsoft) that the breakpoint should bind against. 'LanguageId' may be left as Guid.Empty to indicate that the breakpoint should bind against all languages. 'VendorId' is nearly always left as Guid.Empty, which indicates that only the language is known (not the compiler).

IsBarrier

Indicates if this breakpoint is a barrier that should be set on the hardware, this works for GPU debugging.

IsUnloaded

Returns true if a 'unloaded' event has been raised for this object (example: DkmThread::Unload is called) or if the object has been closed. Note that care must be used when checking this status as, without synchronization, the returned status may no longer be accurate the instruction after it is read.

(Inherited from DkmDataContainer)
Process

DkmProcess represents a target process which is being debugged. The debugger debugs processes, so this is the basic unit of debugging. A DkmProcess can represent a system process or a virtual process such as minidumps.

SourceId

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).

TagValue

DkmPendingBreakpoint is an abstract base class. This enum indicates which derived class this object is an instance of.

Thread

[Optional] Thread on which this breakpoint should fire. If null, the breakpoint will fire on all threads.

UniqueId

Guid which uniquely identifies this pending breakpoint object.

Methods

Close()

Closes a DkmPendingBreakpoint object instance. This will release any resources associated with this object across all components. This includes resources across computer or managed/native marshalling boundaries.

DkmPendingBreakpoint objects are automatically closed when their associated DkmProcess object is closed.

This method may only be called by the component which created the object.

Disable(DkmWorkList, DkmCompletionRoutine<DkmDisablePendingBreakpointAsyncResult>)

Disable the pending breakpoint object so that it will no longer fire. If the pending breakpoint is already bound, any bound breakpoints will be implicitly disabled.

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.

Location constraint: API must be called from an IDE component (component level > 100,000).

Enable(DkmWorkList, DkmCompletionRoutine<DkmEnablePendingBreakpointAsyncResult>)

Sets the state of the pending breakpoint so that instances of the breakpoint that bind in the future will get hit. If the pending breakpoint is not yet enrolled, then this method will also enroll the breakpoint. Enrolling a pending breakpoint consists of attempting to resolve the breakpoint against any modules which are currently loaded and adding the breakpoint to the list of breakpoints which the breakpoint manager will bind on any module load. If the pending breakpoint is already enrolled, existing bound breakpoints will not automatically get enabled. Bound breakpoints must get enabled separately.

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.

Location constraint: API must be called from an IDE component (component level > 100,000).

Enroll(DkmWorkList, DkmCompletionRoutine<DkmEnrollPendingBreakpointAsyncResult>)

This method will enroll the pending breakpoint without enabling it. The result is a breakpoint which the breakpoint manager will attempt to resolve, but which will not fire. Enrolling a pending breakpoint consists of attempting to resolve the breakpoint against any modules which are currently loaded and adding the breakpoint to the list of breakpoints which the breakpoint manager will bind on any module load.

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.

Location constraint: API must be called from an IDE component (component level > 100,000).

GetBoundBreakpoints()

GetBoundBreakpoints enumerates the DkmBoundBreakpoint elements of this DkmPendingBreakpoint object.

GetDataItem<T>()

Gets the instance of 'T' which has been added to this container instance. If this container does not contain a 'T', this function will return null.

(Inherited from DkmDataContainer)
OnBreakpointBound(DkmBoundBreakpoint[])

Notification from the breakpoint manager when a breakpoint has been bound. In the case of user-set breakpoints, this notification will be sent to the AD7 AL, and the AD7 AL will fire a IDebugBreakpointBoundEvent2 to the Visual Studio Debugger UI.

OnBreakpointMessage(DkmBreakpointMessageLevel, String)

Notification from the breakpoint manager concerning the status of binding the breakpoint.

OnBreakpointUnbound(DkmBoundBreakpoint[], DkmBreakpointUnboundReason)

Notification from the breakpoint manager which indicates that the given breakpoint is being unbound.

OnHitWithError(DkmThread, Boolean, DkmBreakpointMessageLevel, String)

Raise a BreakpointHitWithError event. Components which implement the event sink interface will receive the event notification. This method will enqueue the event and control will immediately return to the caller.

This API was introduced in Visual Studio 16 RTM (DkmApiVersion.VS16RTM).

RemoveDataItem<T>()

Remove the instance of 'T' from this container. It is usually unnecessary to call this method as a data container will automatically be emptied when the object is closed.

(Inherited from DkmDataContainer)
SetCondition(DkmWorkList, DkmBreakpointCondition, DkmCompletionRoutine<DkmSetPendingBreakpointConditionAsyncResult>)

Initialize, update or clear the language-level condition on all bound breakpoints of this condition breakpoint. If the same breakpoint has both a language-level condition, and a hit count condition, the language-level condition is applied first.

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.

Location constraint: API must be called from an IDE component (component level > 100,000).

SetDataItem<T>(DkmDataCreationDisposition, T)

Place a new item in the data container.

(Inherited from DkmDataContainer)
SetHitCountCondition(DkmWorkList, DkmBreakpointHitCountCondition, DkmCompletionRoutine<DkmSetPendingBreakpointHitCountConditionAsyncResult>)

Initialize, update or clear the hit count condition on all bound breakpoints of this pending breakpoint. If the same breakpoint has both a language-level condition, and a hit count condition, the language-level condition is applied first.

Note that the hit count condition acts independently on each bound breakpoint, rather than being aggregated together on the pending breakpoint. For example, if the hit count is configured to stop at hit #2, and the breakpoint to two separate locations, each of which hit the breakpoint once, the UI will still not have gone into break mode because neither individual bound breakpoint has hit twice.

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.

Location constraint: API must be called from an IDE component (component level > 100,000).

Explicit Interface Implementations

IDisposable.Dispose()

Applies to