Partilhar via


IDebugDocument2

This interface represents a source document.

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

IDebugDocument2::GetName

Gets the name of the document in one of several forms.

IDebugDocument2::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

Reference

IDebugDocumentPosition2::IsPositionInDocument

IDebugActivateDocumentEvent2::GetDocument

IDebugDocumentContext2::GetDocument

IDebugDocumentPosition2::GetDocument

IDebugDisassemblyStream2::GetDocument