-
Notifications
You must be signed in to change notification settings - Fork 49
Jurassic
JavaScriptEngineSwitcher.Jurassic contains adapter JurassicJsEngine
(wrapper for the Jurassic version of February 24, 2018).
You can specify a settings of JS engine during its registration:
engineSwitcher.EngineFactories
.AddJurassic(new JurassicSettings
{
StrictMode = true
})
;
If you manually create an instance of JS engine, then you can pass settings via the constructor:
IJsEngine engine = new JurassicJsEngine(
new JurassicSettings
{
StrictMode = true
}
);
Consider in detail properties of the JurassicSettings
class:
Property name | Data type | Default value | Description |
---|---|---|---|
EnableDebugging |
Boolean |
false |
Flag for whether to enable script debugging features (allows a generation of debug information).
If this is set to true performance and memory usage are negatively impacted. |
EnableIlAnalysis |
Boolean |
false |
Flag for whether to disassemble any generated IL and store it in the associated function. |
StrictMode |
Boolean |
false |
Flag for whether to allow run the script in strict mode. |
Jurassic has limited support of the debugging in Visual Studio 2010-2013.
You can debug only scripts, that have been executed by using the ExecuteFile
method.
In addition, debuggable script must contain a debugger
statement (see MSDN for more details).
Here are steps, that you need to do for start of debugging:
-
Switch the solution in debug mode.
-
Set the
EnableDebugging
property of theJurassicSettings
class totrue
. -
Add the
debugger
statements in debuggable scripts. -
Click on the Start button.
-
In opened window(s) set breakpoint(s) in the script code.
-
Click on the Continue button.
See also same topic in the Jurassic documentation.
Errors when accessing to the constants of embedded types.
- Registration of JS engines
- Creating instances of JS engines
- JS engines
- Upgrade guides
- Additional reading and resources