Forum Moderators: phranque

Message Too Old, No Replies

simple debugging tricks (javascript, dhtml..)

got a simple tip to share? I do..

         

broniusm

10:23 pm on Jul 14, 2003 (gmt 0)

10+ Year Member



One day, it just dawned on me: If you haven't got microsoft's script debugger installed on a borrowed machine and need to watch a couple variables, punch on into the URL/address:

javascript:alert(variable_name);

Also effective for knowing if a particular object has been declared or strings are evaluating to what they should. You can also use this technique to make things happen (set a particular object's display = '' or call custom functions within your script).

This has come in handy many a time for me.

SethCall

1:12 am on Jul 15, 2003 (gmt 0)

10+ Year Member



I have never used it, but Mozilla has a decent built in javascript debugger. Also, Mozilla's "Javascript console" is much more verbose than Ie's little "A error has occurred".

broniusm

3:13 pm on Jul 15, 2003 (gmt 0)

10+ Year Member



True; but in case anyone is misreading, I was referring to the Micrsoft Script Debugger [microsoft.com], not the little helping popup error notifcation. (note, on the same page ref'd above are version for XP, 2000, etc)

broniusm

3:15 pm on Jul 15, 2003 (gmt 0)

10+ Year Member



I have never used it, but Mozilla has a decent built in javascript debugger

Man oh man, whenever I have a chance (rare, b/c my web apps are IE only), I use the Mozilla DOM inspector [mozilla.org]-- WOW. That's a nice package to have in your arsenal of goodies.