mozrepl icon indicating copy to clipboard operation
mozrepl copied to clipboard

Feature request: REPL for add-on debugging

Open erjoalgo opened this issue 10 years ago • 0 comments

I'm developing a firefox add-on and I'd like to be able to run this repl within the context of the add-on. So far, the only way I know to run js code within the add-on is by starting firefox with the add-on enabled, go to the addons page, clicking Debug, accepting the prompt to start a remote-debugging request, setting a breakpoint, then using the browser in a way that triggers the breakpoint. Then I can go to the console tab of the remote-debugging window and I'm in the add-on context. Naturally, all this clicking and hoops are very slow and frustrating and I'd like to start a repl programmatically, something like: /usr/bin/firefox -profile /path/to/profile/folder -repl -repl 7070

as pointed out in the docs https://github.com/bard/mozrepl/wiki/Starting-the-REPL

However, mozrepl only seems to run in the context of the browser. Is there a way to specify a specific add-on to attach a repl as a debugger? Any pointers for implementing this feature?

erjoalgo avatar Aug 15 '15 11:08 erjoalgo