how debug embedded javascript?

A

Alvin Bruney

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.
 
R

Rick Spiewak

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top