Compartilhar via


DkmLanguageExpression.CompileExpression Method

Definition

Compile the expression into MSIL code that can be executed by the CLR or debugger to evaluate the expression.

This API was introduced in Visual Studio 14 RTM (DkmApiVersion.VS14RTM).

public:
 void CompileExpression(Microsoft::VisualStudio::Debugger::Clr::DkmClrInstructionAddress ^ InstructionAddress, Microsoft::VisualStudio::Debugger::Evaluation::DkmInspectionContext ^ InspectionContext, [Runtime::InteropServices::Out] System::String ^ % Error, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Debugger::Evaluation::ClrCompilation::DkmCompiledClrInspectionQuery ^ % Result);
public void CompileExpression (Microsoft.VisualStudio.Debugger.Clr.DkmClrInstructionAddress InstructionAddress, Microsoft.VisualStudio.Debugger.Evaluation.DkmInspectionContext InspectionContext, out string Error, out Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation.DkmCompiledClrInspectionQuery Result);
public void CompileExpression (Microsoft.VisualStudio.Debugger.Clr.DkmClrInstructionAddress InstructionAddress, Microsoft.VisualStudio.Debugger.Evaluation.DkmInspectionContext? InspectionContext, out string? Error, out Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation.DkmCompiledClrInspectionQuery? Result);
member this.CompileExpression : Microsoft.VisualStudio.Debugger.Clr.DkmClrInstructionAddress * Microsoft.VisualStudio.Debugger.Evaluation.DkmInspectionContext * string * DkmCompiledClrInspectionQuery -> unit
Public Sub CompileExpression (InstructionAddress As DkmClrInstructionAddress, InspectionContext As DkmInspectionContext, ByRef Error As String, ByRef Result As DkmCompiledClrInspectionQuery)

Parameters

InstructionAddress
DkmClrInstructionAddress

[In] The code context to use for compiling the expression.

InspectionContext
DkmInspectionContext

[In,Optional] The inspection context for this evaluation. This value is null if there is no current evaluation context. An example of a time when there is no evaluation context is when compiling conditional breakpoints.

Error
String

[Out,Optional] Indicates any error compiling the expression. If the code compiles successfully, this value should be null. It should also be null for cases where the language or expression is not supported and the debug engine needs to fall back to the default implementation. In error cases, this value indicates the reason for the compile error and the caller should return S_OK.

Result
DkmCompiledClrInspectionQuery

[Out,Optional] The compiled expression. If Result is null, and Error is not null, there was a compile error. If both are null, compilation of the expression is not supported and the debug engine needs to use the legacy expression evaluator.

Applies to