Here are quick instructions for getting the Firefox and Chrome web browsers running in a remotely debuggable state.
On the Mac all instructions assume you've opened a window in the Terminal application. On Windows all instructions assume you've opened the cmd
application.
Here are the instructions for starting a new profile of Firefox on MacOS and Windows. Please file issues or make pull requests for any errors you encounter.
Required Flags
Running the Firefox profile you intended to debug navigate to about:config
and use the search to find the following preferences. Double clicking the boolean preferences is the fastest way to toggle them. You must restart Firefox once you've made these changes.
devtools.debugger.remote-enabled
totrue
devtools.chrome.enabled
totrue
devtools.debugger.prompt-connection
tofalse
Already running Firefox? If you would like to make your current Firefox remotely debuggable; press
shift+F2
and typelisten
in the command bar. Make sure you have enabled the required preferences above.
On the Mac Firefox installs different application names for each release channel (release, beta, aurora, nightly) instead of overwriting the existing application.
Flags
These are the flags necessary to start the remote debug server and use an alternate profile.
- debug server
--start-debugger-server 6080
- temporary profile
--profile $TMPDIR/fx-dev-profile
$ /Applications/Firefox.app/Contents/MacOS/firefox-bin --start-debugger-server 6080 --profile $TMPDIR/fx-dev-profile
For Firefox Beta or Developer Edition (Aurora) replace the
Firefox.app
from the command above with the following app names
- FirefoxBeta.app
- FirefoxDeveloperEdition.app
$ /Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin --start-debugger-server 6080 --profile $TMPDIR/fx-dev-profile
Flags
- debug server
-start-debugger-server 6080
- temporary profile
-profile %TEMP%\fx-dev-profile
64 bit Windows
For users with a 64 bit machine Firefox may have installed in the: C:\Program Files (x86)
folder.
$ "C:\Program Files\Mozilla Firefox\firefox.exe" -start-debugger-server 6080 -profile %TEMP%\fx-dev-profile
$ "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -start-debugger-server 6080 -profile %TEMP%\fx-dev-profile
Firefox for Android creates a Unix socket and listens there for debugger connections. To connect to it, use the adb tool's port forwarding feature:
adb forward tcp:6080 localfilesystem:/data/data/org.mozilla.fennec/firefox-debugger-socket
The exact path to the socket differs based on release channel. You can find the right value in Firefox on Android by loading about:config and checking the value of the preference devtools.debugger.unix-domain-socket
.
Here are the instructions for starting a new temporary profile of Chrome on MacOS and Windows. Please file issues or make pull requests for any errors you encounter.
Flags
- debug server
--remote-debugging-port=9222
- ignore first run setup
--no-first-run
- temporary profile
--user-data-dir=$TMPDIR/chrome-dev-profile
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --no-first-run --user-data-dir=$TMPDIR/chrome-dev-profile
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --remote-debugging-port=9222 --no-first-run --user-data-dir=$TMPDIR/chrome-dev-profile
Flags
- debug server
--remote-debugging-port=9222
- ignore first run setup
--no-first-run
- temporary profile
--user-data-dir=%TEMP%\chrome-dev-profile
$ "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --no-first-run --user-data-dir=%TEMP%\chrome-dev-profile
$ "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --no-first-run --user-data-dir=%TEMP%\chrome-dev-profile
These are the instructions for getting the debugger.html project to connect to and debug Safari on various platforms. Please file issues or make pull requests for any errors you encounter.
Requirements
- Xcode
- Download and install Xcode from Apple
- ios-webkit-debug-proxy
brew install ios-webkit-debug-proxy
- Start the iOS Simulator
- Launch Xcode and then launch the simulator using the following instructions
- Run the proxy in a terminal
ios_webkit_debug_proxy
- Run the debugger.html
npm start
- Connect using the following URL