debugger-connect
Connect to a JS runtime CDP debugger on iOS, Android, or Chromium. Returns connection info needed for subsequent debugger commands.
Instructions
Connect to a JS runtime CDP debugger. iOS / Android: connects to Metro's CDP endpoint on the given port. Chromium: re-uses the page CDP session opened by boot-device — port is ignored. Returns connection info including port, projectRoot (empty on Chromium), deviceName, appName, logicalDeviceId, and isNewDebugger. If already connected, returns the existing connection. Use when starting a debug session or before calling other debugger-* tools. Fails if the runtime is unreachable (Metro down, or Chromium CDP terminated).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Metro server port (ignored for Chromium — its CDP port is encoded in device_id) | |
| device_id | Yes | Device id: iOS simulator UDID, Android logicalDeviceId returned by Metro, or Chromium device id (chromium-cdp-<port>) from list-devices. The returned logicalDeviceId must be forwarded as device_id to all subsequent debugger-* calls to pin them to this device. |