Share via


ICorDebugFunction Interface

Represents a managed function or method.

interface ICorDebugFunction : IUnknown {
        
    HRESULT CreateBreakpoint (
        [out] ICorDebugFunctionBreakpoint **ppBreakpoint
    );
        
    HRESULT GetClass (
        [out] ICorDebugClass **ppClass
    );
        
    HRESULT GetCurrentVersionNumber (
        [out] ULONG32 *pnCurrentVersion
    );
        
    HRESULT GetILCode (
        [out] ICorDebugCode **ppCode
    );
        
    HRESULT GetLocalVarSigToken (
        [out] mdSignature *pmdSig
    );
        
    HRESULT GetModule (
        [out] ICorDebugModule **ppModule
    );
        
    HRESULT GetNativeCode (
        [out] ICorDebugCode **ppCode
    );
        
    HRESULT GetToken (
        [out] mdMethodDef *pMethodDef
    );
        
};

Methods

Method Description

ICorDebugFunction::CreateBreakpoint Method

Creates a breakpoint at the beginning of this function.

ICorDebugFunction::GetClass Method

Gets an ICorDebugClass Interface 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 Method 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.

Requirements

Platform: Windows 2000, Window XP, Windows Server 2003 family

Header: CorDebug.idl

Library: Used as a resource in MSCorEE.dll

.NET Framework Version: 2.0, 1.1, 1.0

See Also

Reference

ICorDebugFunction2 Interface

Other Resources

Debugging Interfaces