Edit

Share via


IDebugProgram2::EnumCodeContexts

Retrieves a list of the code contexts for a given position in a source file.

Syntax

int EnumCodeContexts( 
   IDebugDocumentPosition2     pDocPos,
   out IEnumDebugCodeContexts2 ppEnum
);

Parameters

pDocPos
[in] An IDebugDocumentPosition2 object representing an abstract position in a source file known to the IDE.

ppEnum [out] Returns an IEnumDebugCodeContexts2 object that contains a list of the code contexts.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

This method allows the session debug manager (SDM) or IDE to map a source file position into a code position. More than one code context is returned if the source generates multiple blocks of code (for example, C++ templates).

See also