admin管理员组文章数量:1225011
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
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
Share Improve this question edited Nov 4, 2014 at 18:58 Parth 1,2667 gold badges29 silver badges49 bronze badges asked Apr 28, 2009 at 9:31 MalcolmMalcolm 12.9k28 gold badges92 silver badges126 bronze badges4 Answers
Reset to default 6If 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...
Open Firebug. Click on "Script" then choose your external JS-File from the dropdown menu.
You can add "debugger;" string before the line which you want to debug.
This will invoke Firebug's JS debugger.
In the new firebug you need to click on the file list to get access to external js files. It is no longer in the "Script Tab". Once you've changed to the js file you want to set the breakpoint in you just need to click the line number on the left and reload the page.
alt text http://rival-studios.com/Portals/0/so-firebug.gif
本文标签: javascriptHow to debug in Firebug when code is in separate JS fileStack Overflow
版权声明:本文标题:javascript - How to debug in Firebug when code is in separate JS file? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1739398794a2161516.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论