Taritsyn edited this page Dec 25, 2018 · 2 revisions

JavaScriptEngineSwitcher.Jurassic contains adapter JurassicJsEngine (wrapper for the Jurassic version of February 24, 2018).

Engine settings

You can specify a settings of JS engine during its registration:

	.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.

Not supported in version for .NET Core.

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:

  1. Switch the solution in debug mode.

  2. Set the EnableDebugging property of the JurassicSettings class to true.

  3. Add the debugger statements in debuggable scripts.

  4. Click on the Start button.

  5. In opened window(s) set breakpoint(s) in the script code.

  6. Click on the Continue button.

    Jurassic script debugging in Visual Studio 2013

See also same topic in the Jurassic documentation.

Known issues

Errors when accessing to the constants of embedded types.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.