Share via


ICorDebugFunction Interface

Represents a managed function or method.

Methods

Method

Description

ICorDebugFunction::CreateBreakpoint Method

Creates a breakpoint at the beginning of this function.

ICorDebugFunction::GetClass Method

Gets an ICorDebugClass object that represents the class this function is a member of.

ICorDebugFunction::GetCurrentVersionNumber Method

Gets the version number of the latest edit made to this function.

ICorDebugFunction::GetILCode Method

Gets the Microsoft intermediate language (MSIL) code for this function.

ICorDebugFunction::GetLocalVarSigToken Method

Gets the metadata token for the local variable signature of the function that is represented by this ICorDebugFunction instance.

ICorDebugFunction::GetModule Method

Gets the module in which this function is defined.

ICorDebugFunction::GetNativeCode Method

Gets the native code for this function.

ICorDebugFunction::GetToken Method

Gets the metadata token for this function.

Remarks

The ICorDebugFunction interface does not represent a function with generic type parameters. For example, an ICorDebugFunction instance would represent Func<T> but not Func<string>. Call ICorDebugILFrame2::EnumerateTypeParameters to get the generic type parameters.

The relationship between a method's metadata token, mdMethodDef, and a method's ICorDebugFunction object is dependent upon whether Edit and Continue is allowed on the function:

  • If Edit and Continue is not allowed on the function, a one-to-one relationship exists between the ICorDebugFunction object and the mdMethodDef token. That is, the function has one ICorDebugFunction object and one mdMethodDef token.

  • If Edit and Continue is allowed on the function, a many-to-one relationship exists between the ICorDebugFunction object and the mdMethodDef token. That is, the function may have many instances of ICorDebugFunction, one for each version of the function, but only one mdMethodDef token.

Note

This interface does not support being called remotely, either cross-machine or cross-process.

Requirements

Platforms: See .NET Framework System Requirements.

Header: CorDebug.idl, CorDebug.h

Library: CorGuids.lib

.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0, 1.1, 1.0

See Also

Reference

ICorDebugFunction2 Interface

Other Resources

Debugging Interfaces