-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swank protocol port #24
Comments
Although I used to use slime and swank quite a bit, I have never dug into the protocol. But I don't imagine that it would be too difficult to write a proxy/adaptor that sits between slime and the devtools. That's pretty much what Valence is, except that it adapts other protocols to this one, rather than the other way around. |
I was able to get swank-js to work (my own fork of it at least: https://github.com/erjoalgo/swank-js), and I get a connection to the browser. However, the Components object, although it exists, does not contain any useful attributes. In fact, only contains an "interfaces" attribute,
This means I cannot use, for example I'm actually really confused by all this. In what context is this swank-js server running the expressions from the REPL? Any ideas on how to, say, restart an extension from this REPL? |
Ok, so swank-js allows me to run code in the context of a browser tab. But what I need is to do things like:
I think this requires the browser-side swank server to run in either the browser console context, or the extension remote debugging context. I have unpacked the source, I will try to get swank-js to work from the browser console context. Any pointers for this? I imagine that tabs are a sandboxed environment and that there is no way to gain the privileges accessible in the browser console context. |
You need to connect to an addon scoped actor rather than a tab scoped actor. This is done by Alternatively, if you want access to everything, connect to the chromeActor rather than a tab or addon actor. See here for some more: https://dxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/docs/actor-hierarchy.md?from=actor-hierarchy.md#1 |
I desisted of this for now and I ended up using mozrepl https://github.com/bard/mozrepl , which does give me access to the browser console (Which I assume is the chromeActor?). But I still can't figure out how to reload. Do you have any pointers as to how to reload an extension directly from the browser console? Right now I'm using |
Would it be possible to port this remote debugging protocol to a swank protocol and to provide a swank server for remote debugging? This would enable all slime-based front ends to make a remote debugging connection.
The text was updated successfully, but these errors were encountered: