次の方法で共有


IDebugCanStopEvent2

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

This interface is used to ask the session debug manager (SDM) whether to stop at the current code location.

Syntax

IDebugCanStopEvent2 : IUknown

Notes for Implementers

The debug engine (DE) implements this interface to support stepping through source code. The IDebugEvent2 interface must be implemented on the same object as this interface (the SDM uses QueryInterface to access the IDebugEvent2 interface).

The implementation of this interface must communicate the SDM's call of CanStop to the debug engine. For example, this can be done with a message posted to the debug engine's message handling thread or the object implementing this interface could hold a reference to the debug engine and call back into the debug engine with the flag passed into IDebugCanStopEvent2::CanStop.

Notes for Callers

The DE can send this method each time the DE is asked to continue execution and the DE is stepping through code. This event is sent by using the IDebugEventCallback2 callback function supplied by the SDM when it attached to the program being debugged.

Methods in Vtable Order

The following table shows the methods of IDebugCanStopEvent2.

Method Description
GetReason Gets the reason for this event.
CanStop Specifies whether the program being debugged should stop at the location of this event (and send an event that describes the reason for stopping) or just continue execution.
GetDocumentContext Gets the document context that describes the location of this event.
GetCodeContext Gets the code context that describes the location of this event.

Remarks

The DE sends this interface if the user steps into a function and the DE finds no debug information there or debug information exists but the DE does not know if the source code can be displayed for that location.

Requirements

Header: msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

See also