Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging jQuery with Firebug

Tags:

I've seen a ton of old posts out there on how to try to debug jQuery in Firebug. Anyone have a good way yet cause I do not see one at all that works.

like image 921
PositiveGuy Avatar asked Apr 06 '09 14:04

PositiveGuy


People also ask

What is JavaScript debugger?

The debugger keyword stops the execution of JavaScript, and calls (if available) the debugging function. This has the same function as setting a breakpoint in the debugger. If no debugging is available, the debugger statement has no effect.

How do I debug JavaScript bundles in Chrome?

Open any web site. Open developer tools in chrome by pressing F12 /Ctrl + Shift + I/ right-click anywhere inside the web page and select Inspect/Inspect Element which will be mostly the last option. Go to Sources tab in developer tools and open any minified JS which you want to debug as shown in the image.


1 Answers

I think the asker really just wants to know how to use the tool at a very basic level, and I guess none of these answers target their issue straight on that's why they don't get green check. though the info in them is useful once you get past the basics. This Q is old and the original author has probably gone on to make a million bucks, but perhaps this answer will benefit someone else. I don't know much myself but here is what I do know.

You use the scripts tab from the firebug window. Look at the top you see console, html, css, script DOM etc. tabs. You want to select the script tag then below that in impossibly small type there's another row of tabs the first one defaults to static and the second one is a drop down of all the components that have javascript. Select the one you want to debug and go to the left of it and click in the margin beside the line you want to set a break point. A red circle still appears there. Now over the right there are arrows for step into, step over, etc. and to the right of that under watch you can watch variables go by.

like image 193
Colleen Kitchen Avatar answered Sep 28 '22 19:09

Colleen Kitchen