cdp_connect
Explicitly connect to a Hermes debug target. Use when you need to target a specific platform or port, or reconnect after a manual disconnect. If already connected to a different platform than requested, automatically reconnects to the correct target. Use force=true to always reconnect regardless of current state.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
metroPort | number | No | Metro port to connect to (default: auto-detect 8081/8082/19000/19006) | ||
platform | string | No | Filter target by platform (e.g. “ios”, “android”). If already connected to a different platform, forces reconnection to the correct target. | ||
force | boolean | No | false | Force disconnect and reconnect even if already connected. Use to switch targets or recover from stale connections. |
cdp_connect()