次の方法で共有


IDebugProgram2::EnumCodePaths

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

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

Syntax

HRESULT EnumCodePaths( 
   LPCOLESTR            pszHint,
   IDebugCodeContext2*  pStart,
   IDebugStackFrame2*   pFrame,
   BOOL                 fSource,
   IEnumCodePaths2**    ppEnum,
   IDebugCodeContext2** ppSafety
);
int EnumCodePaths( 
   string                 pszHint,
   IDebugCodeContext2     pStart,
   IDebugStackFrame2      pFrame,
   Int                    fSource,
   out IEnumCodePaths2    ppEnum,
   out 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