Share via


IVsaEngine.GenerateDebugInfo Property

Sets or gets a Boolean value that signifies whether the script engine produces debug information when the IVsaEngine.Compile method is called.

public: __property bool get_GenerateDebugInfo(); 
public: __property void set_GenerateDebugInfo(bool value);
public bool GenerateDebugInfo {get; set;}
Property Get GenerateDebugInfo() As Boolean 
Public Property Let GenerateDebugInfo(ByVal value As Boolean)

Return Value

Returns TRUE if the script engine is set to produce debug information when the IVsaEngine.Compile method is called. Returns FALSE is the script engine will return no debug information.

Remarks

Set this property to true if you want the script engine to produce debug information when the IVsaEngine.Compile method is called; set it to false if you do not want the script engine to produce debug information. When using Visual Basic .NET, the default value of this property is true; when using JScript .NET, the default value is false.

This property should only be set to true when the customization code needs to be debugged, because compiling with debug information is slower and uses more memory. Furthermore, the compiled assembly may run more slowly when debug information is generated. Setting this property to true causes the compiler to create a PDB (program database) file for the debuggable code. The PDB file holds debugging and project state information.

The debugging information generated by the compiler can be persisted by using the debugInfo parameter of the IVsaEngine.SaveCompiledState method. It can be reloaded when the script engine calls back to the IVsaSite.GetCompiledState method.

The following table shows the exceptions that the GenerateDebugInfo property can throw.

Exception Type

Condition

EngineClosed

The IVsaEngine.Close method has been called and the engine is closed.

EngineRunning

The engine is running.

EngineBusy

The engine is currently executing code for another thread.

EngineNotInitialized

The engine has not been initialized.

DebugInfoNotSupported

The engine does not support the generation of debug information.

See Also

Reference

IVsaEngine Interface

IVsaEngine.Compile Method

IVsaEngine.SaveCompiledState Method

IVsaSite.GetCompiledState Method