T
teppic.xxviii
Ok, so this is a little script that I've been working on and off for
the past year or so, and finally I think it might be ready to be put
to the ultimate test: other people!
http://rdgreen.eu/js/debug.js
It's basically a javascript file that can be used to help with the
client-side debugging process.
I use it like this: create a favelet called something like 'Debug
Page' and put the following snip of code in it in place of the URL:
javascriptfunction(){var
s=document.createElement('script');s.type='text/
javascript';s.src='http://rdgreen.eu/js/
debug.js';document.body.appendChild(s);})()
Then whenever you get a problem, simply click the favelet and you can
start inspecting the page you're working on.
Read the comments at the top of the file for a full list of what you
can do; but I think the best way is to just jump in and start snooping
around.
Run the favelet on this page, for example, then press the ` key (back-
tick normally located under the escape key!) In the Evaluate textbox,
type 'document', then press enter...
When developing, simply dot Debug.Write's and Debug.InspectObject's
throughout your code and this can help you track down almost any
problem - it certainly works for me!
Oh, one important note; I do realise there are plenty of debugging
plug-ins and the like out there (such as the one for FireFox called
FireBug, but this javascript file of mine works cross browser! Works
in IE6, IE7, FireFox, Opera, maybe more!
I hope someone out there will find some interest in this, it's been my
baby for far too long and I think it's time I sent it out into the
world on it's own!
Enjoy,
Richard
the past year or so, and finally I think it might be ready to be put
to the ultimate test: other people!
http://rdgreen.eu/js/debug.js
It's basically a javascript file that can be used to help with the
client-side debugging process.
I use it like this: create a favelet called something like 'Debug
Page' and put the following snip of code in it in place of the URL:
javascriptfunction(){var
s=document.createElement('script');s.type='text/
javascript';s.src='http://rdgreen.eu/js/
debug.js';document.body.appendChild(s);})()
Then whenever you get a problem, simply click the favelet and you can
start inspecting the page you're working on.
Read the comments at the top of the file for a full list of what you
can do; but I think the best way is to just jump in and start snooping
around.
Run the favelet on this page, for example, then press the ` key (back-
tick normally located under the escape key!) In the Evaluate textbox,
type 'document', then press enter...
When developing, simply dot Debug.Write's and Debug.InspectObject's
throughout your code and this can help you track down almost any
problem - it certainly works for me!
Oh, one important note; I do realise there are plenty of debugging
plug-ins and the like out there (such as the one for FireFox called
FireBug, but this javascript file of mine works cross browser! Works
in IE6, IE7, FireFox, Opera, maybe more!
I hope someone out there will find some interest in this, it's been my
baby for far too long and I think it's time I sent it out into the
world on it's own!
Enjoy,
Richard