How to stop Firefox debugger server without restarting Firefox - firefox

I have a VSCode config that will start the Firefox debugger server with -start-debugger-server, so that I can run an npm script and launch a website in my existing firefox windows without having to run a special firefox window with the debug server enabled.
Is there a way to turn the debugger server off short of re-starting Firefox? Something like a -stop-debugger-server CLI argument would be nice but there doesn't appear to be such a flag.
I've tried -stop-debugger-server, tried looking in the firefox CLI wiki, tried a web search. Stopped short of trying to re-start Firefox from the command line

Related

Scripting Website Interaction With Firefox

I would like to script Firefox to do the following:
Open my website in multiple tabs
Perform some action on the loaded site (e.g. click on a button)
Preferably running some script (e.g. Python) and somehow connect to my local Firefox and send some commands over.
I know that I can do (2) on the web console with, e.g. $x('/xpath/to/my/button')[0].click(), so I thought of using Firefox's remote debugging mechanism, but
I'm not sure how to "talk" to Firefox using a script through the debugging port (i.e. what syntax)
Somehow I can't even get the remote debugging port to open.
I've tried the following solutions:
Start Firefox with firefox --start-debugger-server 9000
Enter listen 9000 on the web console
Enable Enable browser chrome and add-on debugging toolboxes and Enable remote debugging
All of the above at the same time
But still couldn't get remote debugging to work (didn't open the expected listening port).
Any idea how I could do the above (with remote debugging or something else)?

Starting Chrome on macOS from the Finder with extra command line parameters

I want to stuff remote debugging and other esoteric dev-only only parameters to the Chrome application when it starts but I want it to be always there, including when I click on the app icon.
E.g.:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
How do I pass these command line parameters to the app directly?
I ended up creating an automator application with as shell task. Customized the icon and replaced Chrome.app with the new app in the dock.
I am still looking for a way to change the settings in Chrome so it can connect with remote debugger "on-demand" for specific tasks (not everything as it is set now) but that doesn't seem to be possible at this time. The VSCode folks have apparently solicited the Chrome team to provide this functionality. Stay tuned...

Javascript console not working if Google Chrome is started from OS X terminal

Since I am working locally with d3.js, I need to launch Google Chrome with the --allow-file-access-from-files option. To do this, I start Chrome from the OS X terminal, as follows:
open /Applications/Google\ Chrome.app --args --allow-file-access-from-files
However, it seems that this prevents the javascript console from working correctly. console.log() does not print anything anymore. I suppose the output is redirected elsewhere when Chrome is started this way.
Is there a way to launch Chrome with options and still have the console working as usual?
I've got the same problem. The solution for me was to uncheck the "Set locale environment variables on startup" checkbox in the terminal settings.
After that, restart the terminal and google chrome.
https://groups.google.com/forum/#!topic/google-chrome-developer-tools/rC9_0sIejvs

How to enable debuging when using jpm run to test a Firefox Add-on SDK extension

Can somebody tell me what is required to turn on a debugger when testing a Firefox Add-on SDK extension on Windows 7, 64 bit.
I'm launching the add-on via the command line with the command jpm run.
I've tried bring up the debugger via F12. But, I can't see my JavaScript file(s) there.
A step-by-step guide would be useful.
Use the command jpm run --debug.
Then click on "OK" when asked to accept the incoming connection:
?
You will then have a debugger window from which you can select your JavaScript files:

How to develop firefox add-on

I am developing a firefox add-on using SDK, and use jpm run to test it.
But everytime I changed someting in my code, I have to close my browser and than use jpm run to start browser and test it.
Can I update it without restart firefox?
I have made some search on google, some people told me that I should use Extension Auto-Installer add-on.(https://addons.mozilla.org/en-US/firefox/addon/autoinstaller/)
As its description says, this extension will listen a port at localhost(by default, at 8888)
After I installed it, I use the command wget --post-file=tieba.xpi http://localhost:8888/ to post my add-on, and here is what wget returned
and nothing happend in my firefox.
Is there any mistake in my operation?
Or is there any way to debug my add-on without restart firefox?

Resources