2

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?

Lucero
  • 59,176
  • 9
  • 122
  • 152

2 Answers2

2

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

Pavel Krymets
  • 6,253
  • 1
  • 22
  • 35
0

Try debugging your code as described here: http://jurassic.codeplex.com/wikipage?title=Debugging&referringTitle=Documentation

pms1969
  • 3,354
  • 1
  • 25
  • 34
  • I don't need debugging, I need a way to determine error location when evaluation exception is raised. – Pavel Krymets Apr 27 '12 at 08:10
  • Not sure if this gives you what you want then http://jurassic.codeplex.com/discussions/241774, but if you look at the replies from Paul Bartrum (first and second replies), its saying that you need to wrap your error in a JavaScriptException which will preserve the stack trace for you. – pms1969 Apr 27 '12 at 08:22