This project has moved. For the latest updates, please go here.

Debugging API that the host app can control?

Aug 2, 2011 at 12:53 AM

Jint has a debugging API that lets the hosing app implement a debug ui - see http://jint.codeplex.com/wikipage?title=Debugging

I'd like to see how to do such a thing with Jurassic since (a) I can't get Jint working on SL (antlr is a bit of a pain) and (b) Jurassic should be much faster than Jint.

Any ideas?  I'm writing a web-based IDE for kids to develop games and I want to have everything in the one toolset.

Coordinator
Aug 2, 2011 at 4:56 AM

Debugging is much harder in a compiled environment.  Jurassic does have a debug mode (the EnableDebugging property) but it is based on the standard .NET debugging API, which is not exactly straightforward to host (and I believe your code needs to be unmanaged).  Sample here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=19621

It is possible for me to support the same sort of interface as Jint by raising an event after each line of code.  This would slow things down significantly but would enable some pretty powerful scenarios.  I'll have a think.

May 15, 2013 at 9:45 AM
If I have to support raising an event after each line of code execution in Java Script.

I have found this method "InlineSetPropertyValue" in class Jurassic.Library.ObjectInstance for simple line of execution but what will be the method for functions ?

SampleJs.js
var count = 1; // worked //Jurassic.Library.ObjectInstance InlineSetPropertyValue
myFunction();
function myFunction()
{
var t1 = "inside my function"; //dont work  
}
var t2 = "end";

Thanks in advance.