Please discard the previous mail (it's been sent by accident) and consider the following instead:
On Tue, Aug 18, 2009 at 19:56, Olivier Cornu<[email protected]> wrote: > On Tue, Aug 11, 2009 at 17:38, johnjbarton<[email protected]> wrote: >> >> We would be happy to help you create a GM extension for Firebug. > > Considering the amount of FB code patching that seems necessary so far > (firebug-service, debugger, lib...), will this be doable using a FB > extension only? > That would be excellent... That's still a question i wanted to ask. :p > On Tue, Aug 4, 2009 at 16:49, johnjbarton<[email protected]> wrote: >>> > You will need the line numbers for points of concatenation, eg. a.js >>> > 1-150, b.js 151-213, c.js 213-end. >>> >>> Yes. From what i see, i guess line numbers should be taken care of in >>> SandboxSourceFile... >> >> Yes, it has to translate the line number the user wants to see back >> and forth to the ones the compiler assigns. > > Alright. Frankly, i'm still quite puzzled at how the line mangling > between jsdIScript and SourceFile work... > That is, even when sticking to the simple case: one GM script file run > in its Sandbox (i'm temporarily putting aside the complex case: many > files concatenated and run into a single GM script sandbox). > I've been able to make GM scripts proper name and source code appear > in FB's "Scripts" tab. It is possible to set a breakpoint and the > debugger will properly stop on it on page reload. Restarting execution > also works (i haven't really tested stepping). But there are a few > problems (for example, the breakpoint's red dot in the script margin > does not change state when the debugger stops on it). The only line mangling i've done though is: SandboxSourceFile.prototype.getBaseLineOffset = function() { return 304; // webmonkey.js:evalInSandbox() line } ...which is a dirty hack. :) > As a reminder, this is what i do: >>> i patch >>> firebug-service.js:getFrameScopeWindowAncestor() to allow finding the >>> right debugger for a GM script sandbox. It then flows as usual up to >>> debugger.js:onTopLevelScriptCreated(), patched in order to delegate >>> the work to onSandboxScriptCreated() in case of a Sandbox scope. >>> Finally, this last method returns a lib.js:SandboxSourceFile object. > > onSandboxScriptCreated() calls a GM method to get details on the > script running in this sandbox. It can thus create a SandboxSourceFile > object with the proper file URL. Sorry again for the inconvenience. -- 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 -~----------~----~----~----~------~----~------~--~---
