Can I use VS.net to debug code in JavaScript (.js) file?

  • Thread starter Thread starter yma
  • Start date Start date
Sure, there is the official way of attaching to the process or you can just
put a stop statement at the line you want to, make sure script debugging is
enabled in internet explorer (enabled by default) and let the application
rip. it will bomb at the stop; statement and automatically attach the
debugger. Use the debugger to step around the stop line and then you can
debugger as normal since the debugger is already attached. As an example:

int x = 0;
x++;
x--; //we want to examine this script value

int x = 0;
x++;
stop; //debugger stops here, use 'set next statement' to point to the next
line
x--;
 
Back
Top