Inspector — custom DevTools-style mobile UI

Overview

The Inspector tab provides a mobile-first DevTools experience for inspecting and debugging web pages directly from your phone or desktop browser. It connects to any Chrome or Chromium browser instance running with remote debugging enabled.

Inspector on a 360 px phone with every optional panel switched on

Getting started

  1. Start your browser with remote debugging enabled (default port: 9222).

  2. Open the Inspector tab in mouaif.

  3. Verify or enter the debugger URL (http://127.0.0.1:9222) and tap Discover targets.

  4. Select a tab from the list to inspect it.

Tip for mobile devices: To inspect a page on your physical device, forward the port with adb reverse tcp:9222 tcp:9222 and point the debugger URL to http://127.0.0.1:9222.

Panels

You can toggle each of the four panels on and off to customize your workspace. The panel switcher (the Preview / Styles / Console / Network / Info chip row) sits at the top of the inspect view and scrolls with the page.

With all five panels on at 375 × 667 the Styles card can sit ~800 px below the chip row, so a card the user is not looking at can be a screen away. Every action that answers in a card brings that card into view first, in one instant jump (no animation, so it reads as a consequence of the tap rather than the page moving on its own):

1. Preview panel

2. Console panel

3. Network panel

4. Info panel

Polling and freshness

The Info panel polls Performance.getMetrics every 2.5 s and the Preview
panel's device-preset choice (size + DPR) is read at capture time. Both read
the current value through a ref rather than closing over props:

Entry retentionBoth list panels keep the newest 2000 entries and drop the rest. The

cap applies to the backing store, not only to the rendered window: an
evicted entry releases the response body it captured (up to 200 KB) and is
removed from the request-id map, so a long session against a chatty page
(polling app, HMR loop) cannot grow the tab's heap without bound. A CDP
event for an already-evicted request is ignored rather than re-creating the
row. Disconnecting resets the buffers entirely.

Tab management

Use the top navigation bar to:

Closing a tab

Close tab is destructive, so the Inspector prompts for confirmation before sending the request to Chrome. Both entry points (the per-row … menu in the targets list and the header overflow menu of an attached tab) open the same in-app sheet: