debugger-status
Check JavaScript runtime debugger connection status and diagnostic info before using other debugger tools; returns structured connected or not_connected results with guidance.
Instructions
Get JS runtime debugger connection status and diagnostic info. Use when you need to verify connectivity before using other debugger tools. Never fails when the runtime is simply unreachable: it returns a discriminated result instead:
{ status: "connected", ... } with port, projectRoot (empty on Chromium and on legacy Metro, e.g. Vega), deviceName, appName, logicalDeviceId (absent on Vega), isNewDebugger (false on the legacy inspector), connected flag, loadedScripts count, and sourceMapReady (always true: waits for pending source maps before returning).
{ status: "not_connected", connected: false, reason, detail, guidance } (port omitted on Chromium), with reason one of metro_not_running, no_app_connected, device_mismatch, cdp_unreachable, runtime_unresponsive, stale_connection, reconnecting. Follow the guidance field; do not retry in a loop.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"device_id": "<device_id>"
},
"name": "debugger-status"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. Range: 1 to 65535. | |
| device_id | Yes | Device id used with debugger-connect. |