Re: Please explain about debugger internals

21 views
Skip to first unread message

Jan Honza Odvarko

unread,
Mar 4, 2013, 2:57:13 AM3/4/13
to fir...@googlegroups.com
On Monday, March 4, 2013 8:36:43 AM UTC+1, Iko Sagi wrote:
I am not a firebug user, I am mostly interested in Javascript in general and firebug internals.
Can anyone please help me understand what is the core of Firebug ability to debug JS code?
I know how to debug JS if you have the access to the underlying JS engine, either it is monkey or v8, but does Firebug access the engine internally (calling back to C++ functions)
Firebug doesn't use C/C++
 
or it uses pure Javascript for that?
Yes, Firebug implementation is pure JS/HTML/XUL/CSS

 If first, in which file can I locate those calls to engine, if second, how exactly is this achieved?
Take a look at
https://github.com/firebug/firebug/blob/master/extension/modules/firebug-service.js
This is where Firebug is accessing underlying JSD (JavaScript Debugger) API provided by Firefox

Note that JSD API are obsolete and replaced by JSD2
https://wiki.mozilla.org/DevTools/Features/Debugger/Notes

Firebug is also switching to JSD2 and you can watch the progress here:
https://github.com/firebug/firebug/tree/jsd2

Obviously my first try was to look into the source code, but I am afraid I am unable to understand how it works without spending many hours.
Thank you very much, may the force be with you
Reply all
Reply to author
Forward
0 new messages