Skip to content

Debug WebViews

In the development server’s config.toml, enable:

[client_features]
cef_debugger = true

Restart the server and let the client reconnect. GTA can stay open for this change. Debugging is disabled by default, before connecting and after disconnecting. The permission applies to every client connected to this server.

The default inspection address is 127.0.0.1:9222 on the PC running GTA.

Connect through Chrome’s remote debugging tools:

  1. Open chrome://inspect/#devices in Chrome on the same PC.
  2. Enable Discover network targets.
  3. Click Configure, add 127.0.0.1:9222, and click Done.
  4. Find the WebView by its URL, such as resources://ui/hud.html, and click inspect.

Each loaded WebView appears as a separate target. Use Console for page errors and bridge calls, Network for failed resource or HTTP requests, and Elements for layout and styles. In Sources, you can set breakpoints in the page’s scripts.

The console runs code in the selected page, where revo is the WebView bridge. Client handlers such as view.on() and view.onRequest() run in the client script runtime. Their output is available in the client logs.

Changes made in DevTools are temporary. For a persistent change, edit and build the frontend, then follow the development workflow.

Pass --cef-debug-port to the helper’s launch command. For two clients, use different ports:

Terminal window
.\client-helper.exe launch --join-code dev --cef-debug-port 9222
.\client-helper.exe launch --join-code dev --cef-debug-port 9223

Wait for the first client to load before starting the second. Add 127.0.0.1:9222 and 127.0.0.1:9223 to Chrome’s target discovery settings.

Use a free port from 1024 to 65535. The option overrides the configured port for that launch without changing the configuration file. Debugger access still requires the server’s cef_debugger permission.

When the launch option is omitted, the client uses cef_debug_port from:

%LOCALAPPDATA%/revo/client.toml

The helper reports this location as configPath in preparation and launch results.

Set the value at the top level, before any section such as [voice]:

cef_debug_port = 9222

The value is read when GTA starts. Restart the client after changing it.

Symptom Check
No targets appear Confirm the client is connected to a server with debugging enabled. Open http://127.0.0.1:9222/json/version using the configured port. A running debugger returns browser version data.
The address is unreachable Check the port, restart GTA if you changed the client configuration, and make sure another process is not using it.
The wrong client’s pages appear Give the clients different ports and select the matching address in Chrome.
One page is missing Check that its WebView was created and has not been destroyed. Check client logs for a load failure.

Reconnecting replaces the old pages. Select the new target if its inspector closes. Page reloads also reset browser handlers, as described in Handlers and navigation.