Restart a session persisted by start({ persist: true }) in this tab, reusing its id so the
agent's existing session id keeps working across the reload. Returns the id, or undefined
when there is nothing live to resume. Never mints a new session: with no unexpired record this
is a no-op, so calling it at startup cannot turn the port on by itself.
Optionaloptions: DebugPortStartOptionsReturns the new session id; a no-op returning the current session if already running.
Optionaloptions: DebugPortStartOptions
Start/stop handle for the agent debug port.
The port evaluates arbitrary code in the page, so on a deployed origin activation is always a deliberate act: flipping the switch in the running app. A local dev server opens it at boot unless started with
DX_DEBUG_PORT=false(compiled out of production builds, so it cannot reach a deployed origin). The caller knows the session id up front only when it suppliedDX_DEBUG_PORT_SESSION; otherwise the id is generated and read back fromtemp/debug-port.json.