Developers
Developer mode
Turn on developer mode in Settings and Arx adds DevTools docked in the page, a developer header on local pages, Inspect Element and unpacked extensions, without weakening its security.
This page is a first draft. It may change before the public beta.
Turn on developer mode in Settings → Developer. Arx adds the tools you reach for every day, without weakening the security you rely on the rest of the time. The setting applies to every profile and window.
Always available
Developer Tools
Press ⌥⌘I, or use the View menu or the command bar, to open Chromium DevTools for the focused page: a tab, a Split View pane, a Peek or Little Arx. With developer mode on, every right-click menu on a page ends with Inspect Element, after the menu's own items, so a text field keeps Cut, Copy, Paste and spelling. The View menu has Inspect Element (⌥⌘C), which opens DevTools and starts picking an element, and JavaScript Console (⌥⌘J), which opens DevTools at its Console. You can change these shortcuts in Settings → Shortcuts.
- DevTools opens docked inside the page, on the right at first, one per inspected page. ⌥⌘I again closes it.
- DevTools' own ⋮ → Dock side menu docks it on the right, left or bottom, or undocks it into its own window. Drag the divider between the page and DevTools to resize it. Arx remembers the side and the size for each profile, after you quit too.
- It belongs to its page: switching tabs hides it with the page and brings it back with it. Each Split View pane, Peek and Little Arx page has its own.
- It stays with its page across navigation, reloads and renderer recovery, and never jumps to another tab or profile.
- Closing the page closes its inspector. ⌘W in an undocked inspector window closes only the inspector.
- Esc inside DevTools stays with DevTools. While you're working in DevTools, its own shortcuts work there instead of in Arx: ⌘F search, ⌘+, ⌘- and ⌘0 zoom DevTools, ⌘P Quick Open, ⇧⌘P the command menu, ⌘K clears the console, ⌘S saves, ⇧⌘C picks an element. Other Arx shortcuts, such as ⌥⌘I and ⌘W, still work.
- There is no remote debugging port.
Turning developer mode off removes the commands, but inspectors that are open stay until they or their pages close.
Developer header on local pages
With developer mode on, a local development page shows a developer header above it instead of looking like any other site. Local pages are those on localhost, *.localhost, 127.0.0.1, [::1], *.test, and private-network addresses such as 192.168.1.10:3000 with a port.
The header shows the page's whole address in monospace, always, with the site menu button before it. Its buttons, from left to right:
- Copy URL.
- Capture: the visible part of the page or a region of it, as with Capture.
- Toggle Developer Tools, docked as above.
- Console and Network open DevTools at that panel.
- Inspect Element opens DevTools and lets you pick an element on the page.
- Split: Add Right, Left, Top or Bottom Split, with the page staying where it is.
The site menu button opens the same site menu as the address bar, with the profile's extensions. In a Split View pane the header also has the pane's close button. Turn it off with Developer header on local pages in Settings → Developer. It shows in main windows only, private ones included, not in Peek or Little Arx.
Device capture
Arx is testing a device capture in the header. It's on in the beta.
Capture opens a popover instead of a menu:
- A preview of the shot: the page in a device, on a coloured background.
- Capture in Portrait Mode frames a phone-shaped slice of the visible page, as tall as the page and centred, in a phone. Off, the whole visible page is framed in a window. The page isn't laid out again at a phone's width: it's the part of it that fits.
- Background picks the background's colour along a slider.
- Capture, or ↩, takes the shot. The device is dark when Arx is in dark mode.
- Plain Screenshot and Capture Area capture as the menu does, without a frame.
The framed shot then works like any capture: copy it, save it, edit it or send it to the chat. Capture Full Page frames the whole page in a window. Arx draws the device and the background itself.
To turn it off, turn off its feature flag in Settings → Advanced → Feature Flags and relaunch Arx, or quit Arx and run:
defaults write dev.capturecontext.arx ARX_DEVICE_CAPTURE -string off
To turn it back on, turn the flag back on in the same place, or quit Arx and run:
defaults delete dev.capturecontext.arx ARX_DEVICE_CAPTURE
With ARX_DEVICE_CAPTURE on, open localhost:3000, click Capture in the developer header: the popover shows a window on a blue gradient. Drag Background to orange, turn on Capture in Portrait Mode, press Return: the phone-framed shot stays on the page with its menu. Choose Copy.
Local tabs in the sidebar
A tab on your computer or local network has a yellow and black border in the sidebar, like construction tape, and its host and port under the title, such as localhost:3000. You can tell your dev server apart from the live site at a glance. This works with developer mode off too.
Local tabs are those on localhost, *.localhost, 127.0.0.1, [::1], *.local, *.test, and private-network addresses such as 192.168.1.1, with or without a port. Turn the border off with Highlight local tabs in Settings → Developer.
Localhost that explains itself
Local servers work at addresses such as localhost:3000 and 127.0.0.1:8080, including WebSocket live reload. When something goes wrong, Arx explains it instead of showing a generic error:
- Nothing is running on the port.
- An
https://address points at a server that speaks plain HTTP. Arx offers the same page overhttp://. - A certificate failed validation. Arx never offers to bypass it.
Developer mode never turns off certificate validation, same-origin protections or Chromium's sandbox. Use http on localhost, or trust your development certificate in Keychain Access.
Load unpacked extensions
With developer mode on, Settings → Extensions offers Load Unpacked…. Pick the folder that contains manifest.json, and the extension loads into the selected profile only.
- Reload picks up your edits. Arx also reloads it when files in the folder change, and it stays loaded across restarts.
- A missing folder, an unreadable folder and an invalid manifest each get their own message.
- Turning developer mode off hides Load Unpacked and Reload; loaded extensions stay until you remove them.
Security data
With developer mode on, Settings → Developer also lists the security data Arx keeps up to date, with the version it's using and when that version arrived:
- Certificate revocation list: certificates revoked since this version of Arx was built.
- Certificate Transparency and root store: the public logs certificates must appear in, and the certificate authorities Arx trusts.
- Certificate error help: the explanations on certificate error pages.
Right after a first launch they show Not downloaded yet; Arx fetches them about a minute after it opens. See Privacy and security for what Arx sends to get them.
Diagnostic pages
Type these in the address bar or the command bar. The chrome:// form works too, and the address bar always shows the arx:// one.
arx://versionandarx://gpuwork for everyone: bug reports often need them.- With developer mode on:
arx://net-internals,arx://process-internals,arx://media-internals,arx://serviceworker-internals,arx://webrtc-internalsandarx://inspect. With it off, these addresses offer nothing.
Pages can't open them, only what you type.
Task Manager
Window → Task Manager (⌥⌘T) lists every Arx process: Arx itself, the GPU process, utility processes such as the network service, and each tab's and extension's process with its memory, CPU and process ID. Tabs that share a process are listed together. It updates every second while it's open. Sort by Memory, CPU % or Process ID.
Select a tab's or an extension's process and click End Process to stop it: its pages show that they stopped, and reload when you go back to them. Arx itself, the GPU process and utility processes can't be ended here. The Task Manager works with developer mode off too.
Assistants
Developer mode also lets you give a local assistant three more access classes: Run scripts in pages, Read console and network logs and Request details (headers, bodies and HAR export). Both stay off until you turn them on for a client, and Arx refuses them whenever developer mode is off. See Grants and approvals and the tool reference.