Few issues with 1.4.0b4

0 views
Skip to first unread message

Unirgy

unread,
Jul 4, 2009, 5:33:28 AM7/4/09
to Firebug
Hi,

I'm trying to debug a javascript that is supplied in AJAX response
using <script> tags (with prototype.js Ajax.Request)

I was trying to find if there's a way to insert breakpoint using
console.* methods, as I can't really set the breakpoint using UI,
because the code is not there before AJAX is called. I couldn't find
such method, so my solution was to enable "Break on all errors" and
insert a deliberate syntax error.

What I've found was - I had real JS errors and Firebug didn't show
them in Console tab.

So I think I have a bug report and a feature suggestion:
console.break();

Thanks

johnjbarton

unread,
Jul 4, 2009, 11:04:07 AM7/4/09
to Firebug


On Jul 4, 2:33 am, Unirgy <uni...@gmail.com> wrote:
> Hi,
>
> I'm trying to debug a javascript that is supplied in AJAX response
> using <script> tags (with prototype.js Ajax.Request)
>
> I was trying to find if there's a way to insert breakpoint using
> console.* methods, as I can't really set the breakpoint using UI,
> because the code is not there before AJAX is called. I couldn't find
> such method, so my solution was to enable "Break on all errors" and
> insert a deliberate syntax error.

The usual way this is done is to load the page and cause the action
that loads the ajax code. Then use the Script panel to set a
breakpoint. Then reload or re-cause the ajax to load. Firebug will
break into the debugger.

>
> What I've found was - I had real JS errors and Firebug didn't show
> them in Console tab.

That's a bug. With Firefox it is hard to get this to work correctly, I
keep trying. If you post a test case to the issues list I will try to
get it to work.

>
> So I think I have a bug report and a feature suggestion:
> console.break();

Use the javascript keyword 'debugger;' for this, that is a single word
statement like:
debugger;

jjb

Unirgy

unread,
Jul 4, 2009, 8:01:57 PM7/4/09
to Firebug
Thank you :)

I'm sure you've heard it a lot, but your extension is real life
saver :)

alfonsoml

unread,
Jul 5, 2009, 5:45:40 AM7/5/09
to Firebug


On Jul 4, 11:33 am, Unirgy <uni...@gmail.com> wrote:
> Hi,
>
> I'm trying to debug a javascript that is supplied in AJAX response
> using <script> tags (with prototype.js Ajax.Request)
>
> I was trying to find if there's a way to insert breakpoint using
> console.* methods, as I can't really set the breakpoint using UI,
> because the code is not there before AJAX is called. I couldn't find
> such method, so my solution was to enable "Break on all errors" and
> insert a deliberate syntax error.
>
> What I've found was - I had real JS errors and Firebug didn't show
> them in Console tab.
>

Maybe it's this problem: http://code.google.com/p/fbug/issues/detail?id=1970
I can assure you that I can't use Firefox with Firebug to work with
XmlHttpRequest due to it as I don't get any warning about the errors,
the script just stops and it's impossible to know the reason.
Fortunately the rest of the browsers have nice debugging tools.

johnjbarton

unread,
Jul 5, 2009, 12:18:21 PM7/5/09
to Firebug
Thanks for the excellent test case. I find that when I run the test
case with Firebug inactive, I also do not get any error message. Is
that your experience?

> Fortunately the rest of the browsers have nice debugging tools.

And you are welcome for that. If you notice they all look like
Firebug ;-).

jjb



Reply all
Reply to author
Forward
0 new messages