471,593 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,593 software developers and data experts.

breakpoint debugging in javascript -- state of the art

Hello,

Wondering what everyone's experience with breakpoint debugging is
here. I've been using firebug for a few years and, while I'm delighted
to have _some_ debugging ability, I've found it to be very fussy,
difficult to know when it's going to work or not. I'm curious how
others approach debugging, and if anyone here feels they are able to
use a breakpoint debugger reliably.

thanks,

-Morgan
Aug 19 '08 #1
6 1957
On Aug 19, 3:53 pm, Morgan Packard <hellomorganpack...@gmail.com>
wrote:
Hello,

Wondering what everyone's experience with breakpoint debugging is
here. I've been using firebug for a few years and, while I'm delighted
to have _some_ debugging ability, I've found it to be very fussy,
difficult to know when it's going to work or not. I'm curious how
others approach debugging, and if anyone here feels they are able to
use a breakpoint debugger reliably.

thanks,

-Morgan
If I need lots of output to debug I make a floating div on the page
and add output to it, like a terminal window.
Otherwise it's just the good old fashioned alert.
I've never used firebug in my life and don't intend to.
http://cylo.co.uk
Aug 19 '08 #2
Morgan Packard wrote:
Hello,

Wondering what everyone's experience with breakpoint debugging is
here. I've been using firebug for a few years and, while I'm delighted
to have _some_ debugging ability, I've found it to be very fussy,
difficult to know when it's going to work or not. I'm curious how
others approach debugging, and if anyone here feels they are able to
use a breakpoint debugger reliably.
thanks,
-Morgan
I completely agree on Firebug's unreliable approach to breakpointing.
It's completely random whether it will work or not. You can't tell them
(on their google forum) about anything like that though. They get all
defensive and attack you for casting doubt on their great tool. It's at
least an improvement on the worst debugging tool ever invented - Venkman.

I find that Microsoft Visual Studio is the only reliable debugger. If
you set a breakpoint, you're 99% sure that it will stop if that line of
code is executed. The 1% doubt is for code that's conditionally loaded
into scope and VS can be unsure. It's mostly good though. I use the 2003
..NET version. It can even let you set breakpoints in code that was
brought into existence via an eval statement (which Firebug can't do).

Neither of them let's you debug code that was created dynamically in the
parent page from a createElement from inside an iframe though. If any of
that code has an error, you get things like Error on line 21489513.

Aptana is a plugin which I believe lets you debug JS in Eclipse. I tried
it once but gave up after a short time. I should have put the time in to
get it working but never did.
Aug 19 '08 #3
Laser Lips wrote:
On Aug 19, 3:53 pm, Morgan Packard <hellomorganpack...@gmail.com>
wrote:
>Wondering what everyone's experience with breakpoint debugging is
here. I've been using firebug for a few years and, while I'm delighted
to have _some_ debugging ability, I've found it to be very fussy,
difficult to know when it's going to work or not. I'm curious how
others approach debugging, and if anyone here feels they are able to
use a breakpoint debugger reliably.

I've never used firebug in my life and don't intend to.
Why? You don't like making your job easier?
Aug 19 '08 #4
Stevo meinte:
Morgan Packard wrote:
>Hello,

Wondering what everyone's experience with breakpoint debugging is
here. I've been using firebug for a few years and, while I'm delighted
to have _some_ debugging ability, I've found it to be very fussy,
difficult to know when it's going to work or not. I'm curious how
others approach debugging, and if anyone here feels they are able to
use a breakpoint debugger reliably.
thanks,
-Morgan

I completely agree on Firebug's unreliable approach to breakpointing.
It's completely random whether it will work or not. You can't tell them
(on their google forum) about anything like that though. They get all
defensive and attack you for casting doubt on their great tool. It's at
least an improvement on the worst debugging tool ever invented - Venkman.
Firebug is - IMO - still the most "direct" tool for debugging. Apart
from the breakpoints you still have console.log...
I find that Microsoft Visual Studio is the only reliable debugger. If
you set a breakpoint, you're 99% sure that it will stop if that line of
code is executed. The 1% doubt is for code that's conditionally loaded
into scope and VS can be unsure. It's mostly good though. I use the 2003
.NET version. It can even let you set breakpoints in code that was
brought into existence via an eval statement (which Firebug can't do).
I found Opera's Dragonfly more reliable with breakpoints, but haven't
used it too much, yet.

Gregor

--
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com ::: Bildagentur für den alpinen Raum
Aug 19 '08 #5
On Aug 19, 4:28 pm, Stevo <n...@mail.invalidwrote:
Laser Lips wrote:
On Aug 19, 3:53 pm, Morgan Packard <hellomorganpack...@gmail.com>
wrote:
Wondering what everyone's experience with breakpoint debugging is
here. I've been using firebug for a few years and, while I'm delighted
to have _some_ debugging ability, I've found it to be very fussy,
difficult to know when it's going to work or not. I'm curious how
others approach debugging, and if anyone here feels they are able to
use a breakpoint debugger reliably.
I've never used firebug in my life and don't intend to.

Why? You don't like making your job easier?
Just never had the need to use it. I can do all my debugging without
it. Firebug has'nt always been arround, alerting was the only way to
see data at certain points in the code, AND can actually act as a
break point to a certain degree because while an alert is active,
javascript code stops.

Why do you feel the need to use it?
Aug 20 '08 #6
Morgan Packard wrote:
Wondering what everyone's experience with breakpoint debugging is
here. I've been using firebug for a few years and, while I'm delighted
to have _some_ debugging ability, I've found it to be very fussy,
difficult to know when it's going to work or not. I'm curious how
others approach debugging, and if anyone here feels they are able to
use a breakpoint debugger reliably.
I found breakpoints for client-side scripts (along with those for the
corresponding server-side script) quite useful when debugging a virtually
undocumented XHR-based Web application a while ago. I used Firebug < 1.2 at
that time (IIRC 1.0.x), when there was no indication yet as to at which
lines execution could be suspended. Firebug 1.2.x now marks the
corresponding line numbers with green foreground color here, and I would say
debugging works reliable for me then. (Still, I had hoped that Joe
implemented my suggestion of setting the breakpoint on the next available
line instead.) If you need more than simple debuggign, you can install
Venkman, the original JavaScript debugger on which Firebug's debugger is based.

Of course, it is a PITA to debug minified code (although Venkman can
pretty-print it). Which is one of several reasons why I strongly recommend
against minifying.
HTH

PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Aug 20 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by John Kutsor | last post: by
1 post views Thread by Bob | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.