Skip to content

Devtools

Delan Azabani edited this page Jun 2, 2023 · 9 revisions

Servo can connect to Firefox's Developer Tools, allowing you to troubleshoot JavaScript and CSS.

Starting Servo with Devtools

You can use the --devtools option to have Servo open a Devtools port for you. For example:

./mach run http://mozilla.org --devtools=6000

Note that the option and port number need to be separated by =, not space, otherwise it will mean “enable devtools with a random port number, and navigate to ./6000”.

Connecting from Firefox

Follow the steps on MDN to connect to Servo like a remote device.

Connecting to Firefox Reality

Running Firefox Reality on desktop Windows:

  1. Run a command prompt as administrator, then run checknetisolation loopbackexempt -is -n=MozillaFoundation.FirefoxReality_k8h5m1m6r2tyc (this disables server loopback isolation)
  2. Launch Firefox Reality, press the devtools button to get the port number
  3. In desktop Firefox, go to about:debugging and add localhost:[port] as a new remote target
  4. Connect to the new target, and accept the new devtools connection in the Firefox Reality window

Running Firefox Reality in a HoloLens (device or emulator)

  1. Launch Firefox Reality, press the devtools button to get the port number
  2. Launch the HoloLens' device portal to get the device IP address
  3. In desktop Firefox, to go about:debugging and add [ip]:[port] as a new remote target
  4. Connect to the new target, and accept the new devtools connection in the Firefox Reality window on the device
Clone this wiki locally