Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug in Firebug when code is in separate JS file?

I am starting out with Firebug.

I have a JS file that has some JQuery in it.

how do I debug that code when the HTML page rendered does not have any javascript just ref to my file.

thanks Malcolm

like image 917
Malcolm Avatar asked Apr 28 '09 09:04

Malcolm


3 Answers

If you go to the script tab there'll be a little drop down box that will you let you select any scripts linked to in the page. Won't help you much if they're minified though...

like image 92
CurtainDog Avatar answered Nov 01 '22 03:11

CurtainDog


Open Firebug. Click on "Script" then choose your external JS-File from the dropdown menu.

like image 4
B.E. Avatar answered Nov 01 '22 02:11

B.E.


You can add "debugger;" string before the line which you want to debug.

This will invoke Firebug's JS debugger.

like image 3
Kirtan Avatar answered Nov 01 '22 04:11

Kirtan