Export (0) Print
Expand All

ICorDebugEval Interface

Provides methods to enable the debugger to execute code within the context of the code being debugged.

Method

Description

ICorDebugEval::Abort Method

Aborts the computation this ICorDebugEval object is currently performing.

ICorDebugEval::CallFunction Method

Sets up a call to the specified function. (Obsolete in the .NET Framework version 2.0; use ICorDebugEval2::CallParameterizedFunction instead.)

ICorDebugEval::CreateValue Method

Gets an interface pointer to an ICorDebugValue Interface object of the specified type, with an initial value of zero or null. (Obsolete in the .NET Framework 2.0; use ICorDebugEval2::CreateValueForType instead.)

ICorDebugEval::GetResult Method

Gets an interface pointer to an ICorDebugValue that contains the results of the evaluation.

ICorDebugEval::GetThread Method

Gets an interface pointer to the ICorDebugThread where this evaluation is executing or will execute.

ICorDebugEval::IsActive Method

Gets a value that indicates whether this ICorDebugEval object is currently executing.

ICorDebugEval::NewArray Method

Allocates a new array of the specified element type and dimensions. (Obsolete in the .NET Framework 2.0; use ICorDebugEval2::NewParameterizedArray instead.)

ICorDebugEval::NewObject Method

Allocates a new object instance and calls the specified constructor method. (Obsolete in the .NET Framework 2.0; use ICorDebugEval2::NewParameterizedObject instead.)

ICorDebugEval::NewObjectNoConstructor Method

Allocates a new object instance of the specified type, without attempting to call a constructor method. (Obsolete in the .NET Framework 2.0; use ICorDebugEval2::NewParameterizedObjectNoConstructor instead.)

ICorDebugEval::NewString Method

Allocates a new string object with the specified contents.

An ICorDebugEval object is created in the context of a specific thread that is used to perform the evaluations. All objects and types used in a given evaluation must reside within the same application domain. That application domain need not be the same as the current application domain of the thread. Evaluations can be nested.

The evaluation's operations do not complete until the debugger calls ICorDebugController::Continue, and then receives an ICorDebugManagedCallback::EvalComplete callback. If you need to use the evaluation functionality without allowing other threads to run, suspend the threads by using either ICorDebugController::SetAllThreadsDebugState or ICorDebugController::Stop before calling ICorDebugController::Continue.

Because user code is running when the evaluation is in progress, any debug events can occur, including class loads and breakpoints. The debugger will receive callbacks, as normal, for these events. The state of the evaluation will be seen as part of the inspection of the normal program state. The stack chain will be a CHAIN_FUNC_EVAL chain (see the CorDebugStepReason enumeration and the ICorDebugChain::GetReason method). The full debugger API will continue to operate as normal.

If a deadlocked or infinite looping situation arises, the user code may never complete. In such a case, you must call ICorDebugEval::Abort before resuming the program.

NoteNote

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

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

Community Additions

ADD
Show:
© 2014 Microsoft