fix(runtime): bridge console to the inspector regardless of --inspect flag (#35795)
The main-worker bootstrap wrapped the console into the V8 inspector
console only when an `--inspect*` flag was present at startup. When the
inspector is activated later at runtime - via `node:inspector` `open()`
(as the vscode-js-debug bootloader does) or SIGUSR1 -
`Runtime.consoleAPICalled` is never emitted, so debugger clients (e.g.
the VS Code Debug Console) show no console output even though the
session is otherwise fully functional.
The worker bootstrap already wraps unconditionally; do the same for the
main worker. The bootstrap options slot (3) is left in place, only its
consumer is removed.
Includes a regression test (`inspector_console_api_late_open` in
`tests/unit/inspector_test.ts`, next to the other CDP protocol tests):
it spawns a child that opens the inspector via a `--require` preload,
connects over CDP, and asserts `Runtime.consoleAPICalled` arrives for
`console.log`. The wait is bounded by a 10 s deadline so a regression
fails with a diagnostic instead of hanging, and the child is killed in a
`finally` block.
Part of a series fixing VS Code debugging with `--watch` (#35791).
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>