By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,818 Members | 2,121 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,818 IT Pros & Developers. It's quick & easy.

Request for Comments: Updated Debugging/Dump Tool

P: n/a
I've been working on a new release of my "debug" library. The original
allowed the developer to "dump" complex objects (even those with circular
references) to the screen for review. This version adds many features:

+) A simplified "log" method for writing arbitrary information to a log
window.
+) A simple "timer" method which can be used to time blocks of code.
+) Simplified methods for dumping currently available cookies and query
string values.
+) Several HTML updates/optimizations (the tool no longer uses frames for
example).

A test page is here (note that the debug console opens in a popup window -
blockers may prevent this of course):

http://www.depressedpress.com/test/d...&test1=newtesy

Feel free to examine the source (the test page source is a little ugly, but
the source of the component itself should be clean at this point.)

Currently it's been tested in FF and IE (6 and 7). The last tie I tried
Opera it didn't work... but I've not tried the new version of Opera. There
are slight differences between FF and IE (Firefox, for example, will not
acknowledge local links in generated content while IE has some cosmetic
vertical scrolling issues).

The roughest part (and the newest) is the "dpLog" section - it's presentable
but I hope to improve it considerably before release.

I'm open to any bugs or criticisms (or feature requests) at this point.

Please note that this tool is not intended to replace more integrated tools
like the fabulous FireBug. Instead I would like to think that it could
compliment them. Since IE doesn't have a FireBug equivalent I find the this
tool much more useful on that platform in general, although I use it
extensively in FireFox as well.

The original library, for comparison, is here:

http://www.depressedpress.com/Conten...eBug/Index.cfm

Of course this new version, like the last, will be open-sourced under the
very liberal BSD license and free.

Thanks in advance,

Jim Davis
Sep 17 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a

Jim Davis wrote:
I've been working on a new release of my "debug" library. The original
allowed the developer to "dump" complex objects (even those with circular
references) to the screen for review. This version adds many features:

+) A simplified "log" method for writing arbitrary information to a log
window.
+) A simple "timer" method which can be used to time blocks of code.
+) Simplified methods for dumping currently available cookies and query
string values.
+) Several HTML updates/optimizations (the tool no longer uses frames for
example).
I'm having trouble keeping up with all the innovation in the Javascript
space. I have not been able to test all the debuggers I've heard about.
Could you tell me why I should try yours, as opposed to just sticking
with the FireFox extension I've got now, or Venkman?

Sep 18 '06 #2

P: n/a

"Jake Barnes" <lk******@geocities.comwrote in message
news:11**********************@d34g2000cwd.googlegr oups.com...
>
Jim Davis wrote:
>I've been working on a new release of my "debug" library. The original
allowed the developer to "dump" complex objects (even those with circular
references) to the screen for review. This version adds many features:

+) A simplified "log" method for writing arbitrary information to a log
window.
+) A simple "timer" method which can be used to time blocks of code.
+) Simplified methods for dumping currently available cookies and query
string values.
+) Several HTML updates/optimizations (the tool no longer uses frames for
example).

I'm having trouble keeping up with all the innovation in the Javascript
space. I have not been able to test all the debuggers I've heard about.
Could you tell me why I should try yours, as opposed to just sticking
with the FireFox extension I've got now, or Venkman?
It's a bit unfair to compare this tool with tools like Firebug orVenkman -
they are both VERY good tools (I highly recommend both) but they are browser
extensions - they require an install. Don't get me wrong - for that install
you get extremely useful tools which offer much more power than mine (as
they are able to go "under the covers" of the host browser and provide
functionality impossible in "vanilla" JavaScript) - but you do need to have
an install. My tool will work with no install (although pop-up windows must
be allowed from the site).

My tool also works in IE. While it's not as functional as a FireBug or
Venkman neither of those tools provide any functionality for IE.

My tool offers an easy way to examine complex data structures. I think,
pridefully perhaps, that it's one of the best implementations in this arena:
my tool doesn't choke on cicular references, allows the developer to set
levels of recursion and doesn't choke on odd browser objects which claim to
be objects but can't be enumerated.

This new version adds simple methods to examine available cookies and query
string variables, log messages to a console and time blocks of code.

It WILL NOT replace a good integrated debugger like FireBug - and it's not
trying to. I'm essentially trying to pack as much useful functionality into
plain-vanilla browser script. It's missing features because of this but it
also has its strengths because of this.

(It can be easily argued that my tool is NOT a debugger in the traditional
sense: it doesn't offer breaks, step-through or tracing capabilities for
example. I simply couldn't come up with a better label.)

As I've said - there's no install here and no download (unless you want to
use it on your own pages) - just go to the page and you'll see the console.
The in-progress work on the new version is here:

http://www.depressedpress.com/test/d...&test1=newtesy

Jim Davis
Sep 18 '06 #3

P: n/a

Jim Davis wrote:
It's a bit unfair to compare this tool with tools like Firebug orVenkman -
they are both VERY good tools (I highly recommend both) but they are browser
extensions - they require an install. Don't get me wrong - for that install
you get extremely useful tools which offer much more power than mine (as
they are able to go "under the covers" of the host browser and provide
functionality impossible in "vanilla" JavaScript) - but you do need to have
an install. My tool will work with no install (although pop-up windows must
be allowed from the site).

My tool also works in IE. While it's not as functional as a FireBug or
Venkman neither of those tools provide any functionality for IE.

My tool offers an easy way to examine complex data structures. I think,
pridefully perhaps, that it's one of the best implementations in this arena:
my tool doesn't choke on cicular references, allows the developer to set
levels of recursion and doesn't choke on odd browser objects which claim to
be objects but can't be enumerated.

This new version adds simple methods to examine available cookies and query
string variables, log messages to a console and time blocks of code.

It WILL NOT replace a good integrated debugger like FireBug - and it's not
trying to. I'm essentially trying to pack as much useful functionality into
plain-vanilla browser script. It's missing features because of this but it
also has its strengths because of this.

It certainly looks interesting. Are you serious about it? Will you get
others on board? Are you releasing it under an open source license?
Will you be offering tutorials?

I see a lot of stuff about logging. Any reason not to just use JsUnit?
I am impressed that this is a way to get some debugging done in IE.
Debugging IE drives me insane. Also Safari, I imagine.

Sep 19 '06 #4

P: n/a

"Jake Barnes" <lk******@geocities.comwrote in message
news:11*********************@i42g2000cwa.googlegro ups.com...
It certainly looks interesting. Are you serious about it? Will you get
others on board? Are you releasing it under an open source license?
Will you be offering tutorials?
Lemme see... in order:

1) As serious as I get about anything else I suppose.

2) So far nobody else has offered to come on board - but I'll happily accept
any help offered.

3) It will be released under the same (very liberal) BSD license that the
current version is under.

4) The documentation for the current version will be updated to reflect the
changes. It features examples and full documentation. Here's that page:

http://www.depressedpress.com/Conten...ions/DP_Debug/

The same style of documentation, example and license will be used for this
updated version.
I see a lot of stuff about logging. Any reason not to just use JsUnit?
Nope. If you've already got something that does what this does and like it
then there's no reason I can see to switch.

Although in this case JSUnit seems specifically suited to unit testing and
seems very tilted towards those that already have experience with JUnit.
I am impressed that this is a way to get some debugging done in IE.
Debugging IE drives me insane. Also Safari, I imagine.
I've no way to test this in Safari so I can't say for sure but I hope it
works - I've made every attempt to standardize the code (there's only one
browser-specific check to get around a really annoying bug in FireFox).

Jim Davis
Sep 19 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.