Getting JS error location when using Jurassic

922 views Asked by At

I'm using the Jurassic JS engine to run some JS code in a .NET application. Unfortunately I get an exception when running the code which is caused by some undefined value somewhere. But how can I locate the exact spot? Note that I cannot run it in a different environment because I use methods exported from .NET, so I'd like to find a way to get the location of the runtime error.

I'm loading/evaluating the files using the ScriptSource class, so that they do have an attached file name. Still I don't get any output post-mortem - am I missing something?

2

There are 2 answers

2
pms1969 On BEST ANSWER
0
Pavel Krymets On

Jurassic.JavaScriptException.LineNumber gives error location but only in parsing errors.