次の方法で共有


IDebugDocument2

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 represents a source document.

Syntax

IDebugDocument2 : IUnknown

Notes for Implementers

Visual Studio typically implements this interface. A debug engine (DE) can also implement this interface when it needs to supply the source code and the source does not exist on disk. In such cases, the DE would also implement IDebugDocumentContext2 and IDebugActivateDocumentEvent2 interfaces, as well as some additional methods on the IDebugDisassemblyStream2 and IDebugDocumentPosition2 interfaces.

Notes for Callers

Methods on the IDebugDocumentContext2, IDebugDisassemblyStream2, IDebugDocumentPosition2, and IDebugActivateDocumentEvent2 interfaces return this interface.

Methods in Vtable Order

The following table shows the methods of IDebugDocument2.

Method Description
GetName Gets the name of the document in one of several forms.
GetDocumentClassID Gets the class identifier of the document.

Remarks

This interface is implemented only when the DE supplies the source code. For example, when you are debugging script on an HTML page, the DE supplies the source code because the source is downloaded or generated dynamically and does not exist as a disk file. When debugging traditional languages, such as C++, this interface does not need to be implemented.

Requirements

Header: msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

See also