Hi All, Im trying to access the parameters to a function call in the Inproc debugger.
In a profiler when I catch function entry, I get access to the inproc debugger interfaces and from that I get access to the current thread's ICorDebugILFrame interface with ICorDebugThread::GetActiveFrame. Then call ICorDebugILFrame::GetArgument. I think this is the best way to get access to the parameter values of a function call in this profiler callback. (If not please tell me. I haven't tried IMetaDataImport fully yet) When I call the GetArgument method it sometimes fails with CORDBG_E_IL_VAR_NOT_AVAILABLE, but not always! Even if ICorDebugILFrame::EnumerateArguments indicates that there are arguments available, i can't access them with GetArgument! (ICorDebugValueEnum::Next also fails with the same error) Note this works fine for some methods, but not for others even of the same class. I really have no idea why. eg OK for: .ctor, Set_Property etc Not OK for: ToString (overridden), ordinary public methods with standard value type params, etc Has anyone any ideas? Thanks John #define CORDBG_E_IL_VAR_NOT_AVAILABLE EMAKEHR(0x1304) // An IL variable is not available at the current native IP. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.