IDebugMethodField::EnumAllLocals
Applies to: Visual Studio Visual 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
Creates an enumerator for all local variables of the method, including those generated internally by a compiler.
Syntax
HRESULT EnumAllLocals(
IDebugAddress* pAddress,
IEnumDebugFields** ppLocals
);
int EnumAllLocals(
IDebugAddress pAddress,
out IEnumDebugFields ppLocals
);
Parameters
pAddress
[in] An IDebugAddress object representing a debug address within the method, pointing to a particular scope or context.
ppLocals
[out] Returns an IEnumDebugFields object representing the list of all locals in the specified scope; otherwise, returns a null value indicating no locals.
Return Value
If successful, returns S_OK or returns S_FALSE if there are no locals. Otherwise, returns an error code.
Remarks
Only the variables defined within the block that contains the given debug address are enumerated. This method includes any compiler-generated locals. If all that is needed are the locals explicitly defined in the source, call the EnumLocals method.
A method can contain multiple scoping contexts or blocks.