Click to See Complete Forum and Search --> : JScript - debugger - JIT


SJ Smith
August 15th, 2006, 10:35 AM
Hi,

JScript has a statement 'debugger' that is supposed to act like a break point. when it is hit it should attach the JIT debugger.


if I include this line in a simple jscript file e.g.




var c = WScript.StdIn.Read(1);

WScript.Echo(c);

var x = 3;

debugger;

var y = 4;

var z = x * y;

WScript.Echo(z);



then nothing happens when run with cscript debug.js

If I add the //x e.g. cscript //X debug.js then the program is just debugged from the first line.

How do you get the script to break into the debugger only when the debugger line is reached and is this possible without using //X

Thanks,

PeejAvery
August 15th, 2006, 01:04 PM
Using cscript, you will have to use //X, but there are downloadable alternatives to JavaScript debugging. I have never personally used them, but you can search them at Google.