[solved] Firebug debugging brain fart

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

[solved] Firebug debugging brain fart

Post by pickle »

Hi all,

I'm trying to debug some Javascript, but I'm not able to figure out exactly how to do it with Firebug 1.5.2. I assumed I open up Firebug & go to the "Script" tab, but I can't see a list of the Javascript files, or a way to add breakpoints or step through execution or anything.

I'm sure I'm missing something simple - can anyone point me in the right direction?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Firebug debugging brain fart

Post by Eran »

In the script tab you will see all the loaded Javascript to the left. You can filter what you see by clicking on the selected option above it (default is the title of the current page which shows you all the loaded scripts in that page). You can watch variables / expressions in the right-hand view and see them change as you interact with the page, or set breakpoints directly on the code in the left-side view. You can view errors and run custom code in the 'console' tab.

Check out the docs, they cover most of everything -
http://getfirebug.com/javascript
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Firebug debugging brain fart

Post by VladSun »

*After* you've loaded the HTMl page together with the JS scripts (static/dynamic/evals) you may choose the domain/files to show, then put a breakpoint by clicking on the row numbers (as usual).

Also, you may wish to give a try to the Netbeans JS debugger
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Firebug debugging brain fart

Post by pickle »

Well I'll be smurfed. That pulldown wasn't showing up before. Maybe I just needed a reboot.

Thanks.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply