Skip to content

Latest commit

 

History

History
77 lines (65 loc) · 2.6 KB

idebugprogram2-enumcodepaths.md

File metadata and controls

77 lines (65 loc) · 2.6 KB
description title ms.date ms.topic f1_keywords helpviewer_keywords author ms.author manager ms.subservice dev_langs
Retrieves a list of the code paths for a given position in a source file.
IDebugProgram2::EnumCodePaths
11/04/2016
reference
IDebugProgram2::EnumCodePaths
IDebugProgram2::EnumCodePaths
maiak
maiak
mijacobs
debug-diagnostics
CPP
CSharp

IDebugProgram2::EnumCodePaths

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

Syntax

int EnumCodePaths( 
   string                 pszHint,
   IDebugCodeContext2     pStart,
   IDebugStackFrame2      pFrame,
   Int                    fSource,
   out IEnumCodePaths2    ppEnum,
   out IDebugCodeContext2 ppSafety
);
HRESULT EnumCodePaths( 
   LPCOLESTR            pszHint,
   IDebugCodeContext2*  pStart,
   IDebugStackFrame2*   pFrame,
   BOOL                 fSource,
   IEnumCodePaths2**    ppEnum,
   IDebugCodeContext2** ppSafety
);

Parameters

pszHint
[in] The word under the cursor in the Source or Disassembly view in the IDE.

pStart
[in] An IDebugCodeContext2 object representing the current code context.

pFrame
[in] An IDebugStackFrame2 object representing the stack frame associated with the current breakpoint.

fSource
[in] Nonzero (TRUE) if in the Source view, or zero (FALSE) if in the Disassembly view.

ppEnum
[out] Returns an IEnumCodePaths2 object containing a list of the code paths.

ppSafety
[out] Returns an IDebugCodeContext2 object representing an additional code context to be set as a breakpoint in case the chosen code path is skipped. This can happen in the case of a short-circuited Boolean expression, for example.

Return Value

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

Remarks

A code path describes the name of a method or function that was called to get to the current point in the execution of the program. A list of code paths represents the call stack.

See also