IVsaSite.GetCompiledState Method
Gets the compiled state of a script engine, and, optionally, associated debugging information.
public: void GetCompiledState(
byte[] PE,
byte[] DebugInfo
);
public void GetCompiledState(
byte[] PE,
byte[] DebugInfo
);
MustOverride Public Sub GetCompiledState( _
ByVal PE As byte[] _
ByVal DebugInfo As byte[]
)
Parameters
pe
The compiled state of the engine; an assembly in byte form.debugInfo
The debugging information for the assembly, or a null reference if such information does not exist or is not available.
Remarks
The host initially stores a script engine's compiled state along with debugging information, if available, using the IVsaEngine.SaveCompiledState method and specifying a location to which the compiled state should be persisted. The compiled state of the engine is uniquely identified by the IVsaEngine.RootMoniker property of the script engine that is currently associated with the IVsaSite object.
If debugging information is not available or does not exist, you will be unable to resolve breakpoints in the debugger.
This method is only called by an engine subsequent to a call by the host to the IVsaEngine.Run method. It should not be called at any other time.
A default implementation of the IVsaSite interface, including use of the GetCompiledState method, is provided in Microsoft.Vsa.BaseVsaSite, which is available on the Visual Studio for Applications SDK. BaseVsaSite implements two properties, Assembly and DebugInfo, to get the compiled state. You can derive from this class to provide specific functionality.
The following table shows the exceptions that the GetCompiledState method can throw.
Exception Type |
Condition |
---|---|
GetCompiledStateFailed |
The compiled state could not be loaded. |
CompiledStateNotFound |
There was no existing compiled state for the engine. |
CallbackUnexpected |
The host was not expecting a call at this time. |
See Also
Reference
IVsaEngine.SaveCompiledState Method