IEnumDebugCodeContexts2

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 enumerates the code contexts associated with the debug session, or with a particular program or document.

Syntax

IEnumDebugCodeContexts2 : IUnknown

Notes for Implementers

The debug engine (DE) implements this interface to represent a list of code contexts for a particular text position in a program, or a list of code contexts for a particular document context.

Notes for Callers

Call EnumCodeContexts to obtain this interface representing a list of code contexts for a specific text position in a program's source document.

Call EnumCodeContexts to obtain this interface representing a list of all code contexts in a particular source document.

Methods in Vtable Order

The following table shows the methods of IEnumDebugCodeContexts2.

Method Description
Next Retrieves a specified number of code contexts in an enumeration sequence.
Skip Skips a specified number of code contexts in an enumeration sequence.
Reset Resets an enumeration sequence to the beginning.
Clone Creates an enumerator that contains the same enumeration state as the current enumerator.
GetCount Gets the number of code contexts in an enumerator.

Remarks

Visual Studio calls EnumCodeContexts to populate a list of code contexts the user can choose from when setting the next statement or showing the disassembly for a source file. Multiple code contexts can occur, for example, when there are multiple instances of a C++-style template.

Requirements

Header: msdbg.h

Namespace: Microsoft.VisualStudio.Debugger.Interop

Assembly: Microsoft.VisualStudio.Debugger.Interop.dll

See also