MCP debug_session_update

Description

Toggle flags on an active debug session, or trigger a full rebuild.

mode CANNOT be changed -- attempting to do so returns an error instructing you to call debug_session_end and debug_session_create again.

rebuild: true tears the session down completely and re-establishes it from a fresh build+sideload (forcing a version bump, so the device always genuinely relaunches rather than silently keeping the previous instance running) -- NOT a lightweight reconnect. Every previously-set breakpoint is re-applied afterward under its original id (device-side ids are never stable across a rebuild); any breakpoint the device rejects on reapply is reported in failedBreakpoints rather than failing the whole call. Uniform across cdp_only/dap_only/unified.

KNOWN LIMITATION (cdp_only/unified, permanent, not a bug to report): a breakpoint on code that runs synchronously at app mount/launch (e.g. inside an onMount-style hook, before any await) can be missed after rebuild. BrightScript is safe because the device freezes it at its very first statement until a debugger continues it, so DAP-side reapply always wins the race -- Hermes has no equivalent "pause until debugger attaches" primitive (confirmed unimplemented in Hermes's CDP inspector), so it starts running the instant the process launches, and breakpoints can only be reapplied once the fresh CDP connection is up and settled, by which point mount-time code may have already executed. verified will still read true (the device genuinely accepted the breakpoint), it just arrived too late for that one execution. Set the breakpoint further into the code path, or on a line reached by user interaction rather than mount, to avoid this.

Optional parameters:

  • sessionId (string): Session id returned by debug_session_create. Uses the active session when omitted.
  • coordinatedStop (boolean): toggle coordinated stop (CDP -> DAP only; see debug_session_create).
  • rebuild (boolean): full teardown + re-establish, re-applying breakpoints. See above.

Aliases

Aliases: cdp_session_update.

See also

Parameters

additionalProperties: false

NameTypeRequiredValues
sessionIdstringNo
coordinatedStopbooleanNo
rebuildbooleanNo

sessionId

Session id returned by debug_session_create

coordinatedStop

CDP -> DAP only: see debug_session_create

rebuild

Full teardown + re-establish (forces a version bump; re-applies breakpoints under their original ids)


Did this page help you?