Question about Firebug Script Tab and JavaScript

23 views
Skip to first unread message

Josh Godsiff

unread,
Apr 7, 2014, 12:56:54 PM4/7/14
to fir...@googlegroups.com
Hi all

This isn't exactly a question about Firebug specifically, but rather how (or where in it's source-code) it does something.

Specifically, would someone be able to tell me how the Script tab grabs the source-code for all JavaScript on a page. Also how it manages to suspend execution of JavaScript (e.g. with breakpoints).

The reason I'm asking here is because I'm currently writing a different piece of software, and need to know how to do those two things, and Firebug was the first thing I could think of that had both capabilities (and was an add-on, rather than something inbuilt into the browser).

Thanks
- Josh

Jan Honza Odvarko

unread,
Apr 7, 2014, 2:27:39 PM4/7/14
to fir...@googlegroups.com
Firebug 2.0 is based on JSD2 API (JS debugger API in Firefox)
https://wiki.mozilla.org/Debugger

https://blog.getfirebug.com/2014/04/04/firebug-2-0-alpha-2/

If you implementing a debugger you want to use these API
+ perhaps RDP - remote debugging protocol
https://wiki.mozilla.org/Remote_Debugging_Protocol

Honza
Reply all
Reply to author
Forward
0 new messages