how debug embedded javascript?

  • Thread starter Thread starter Malik Arykov
  • Start date Start date
The easiest way to debug script code is to just put a debug break statement
in the script code at the line you want to examine like so
[script]
stop
more script here

When the host container, usually internet explorer, executes this statement
it immediately stops on this line and allows the user the option to attach
the debugger.
Your very next step is to point the debugger to the line after the stop
statement to cause it to bypass the stop statement and then debugging
continues as normal. Remember to remove the stop statement when done.

The other options are very tedious and error prone to say the least, partly
because script only execute inside a host container and never in its own
process.
 
If you're working in VS.NET, you can also use the "debugger" statement, and
work directly with the VS.NET debugger.

Alvin Bruney said:
The easiest way to debug script code is to just put a debug break statement
in the script code at the line you want to examine like so
[script]
stop
more script here

When the host container, usually internet explorer, executes this statement
it immediately stops on this line and allows the user the option to attach
the debugger.
Your very next step is to point the debugger to the line after the stop
statement to cause it to bypass the stop statement and then debugging
continues as normal. Remember to remove the stop statement when done.

The other options are very tedious and error prone to say the least, partly
because script only execute inside a host container and never in its own
process.


--
Regards,
Alvin Bruney
Got DotNet? Get it here...
http://www.networkip.net/dotnet/tidbits/default.htm
http://devcenter.infragistics.com/Articles/ArticleTemplate.Aspx?ArticleID=2183
 
Back
Top