Run Firebug with tracing and set up for your page. Then use Tracing option FBS_CREATION and FBS_SRCUNITS. Run the Greasemonkey code and look for the jsdIScript creation messages. (You will want to turn off these tracing options, they have high overhead).
Once you figure out what jsd things of the GM scripts, you need to convince Firebug to add them to the context for the web page. After that I guess Firebug will work for you. jjb On Jul 28, 11:56 am, Olivier Cornu <[email protected]> wrote: > On Tue, Jul 28, 2009 at 17:48, johnjbarton<[email protected]> wrote: > > > How are Greasemonkey scripts added to the web page? > > Well, i guess that in order to be accurate one must answer they are > not "added" to the web page. They are executed in a sandbox built > around a XPCNWrapper of the page's window: > > var safeWin = new XPCNativeWrapper(window); > var sandbox = new Components.utils.Sandbox(safeWin); > sandbox.__proto__ = safeWin; > Components.utils.evalInSandbox(scriptSourceCode, sandbox); > > As of now, there is nowhere FB could grab a reference to such a > sandbox or the running script source code. However, i'm thinking about > providing them (script source+sandbox) to FB somehow from the GM code. > As i see it so far, i'd like to be able to browse the running GM > scripts source code from FB scripts tab, as well as poke around in > these scripts sandboxes in the FB console tab after a cd(sandbox). In > a perfect world, i'd love to achieve that via a simple FB extension > included in the GM add-on, but it probably is over-optimistic... :-) > > -- > Olivier --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/firebug?hl=en -~----------~----~----~----~------~----~------~--~---
