简体   繁体   中英

Debugging JS inside script tab in firebug

I have a html file with js also wirtten inside it. I want to debug that js using firebug. I don't see this js under the firebug's script tab. How do I debug the js inside html in firebug? Do I need to add anything special in html file so that it shows up in firefox browser?

It seems that you are having inline script code in your html file.

You can debug it using firebug.

Please follow the steps:

  1. Open firebug window (press F12)
  2. Go to Script tab
  3. Select inline tab
  4. Add breakpoints at required script lines.
  5. Refresh your page.

Now you are able to debug your inline page script. :)

On line 1 of you script put the line

debugger;

Open the page, open firebug, and hit refresh. It should stop execution at the debugger statement.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM