node/lib/internal
Trivikram Kamat 9a3393d14f
debugger: lazily wait for initial break output
Wait for the initial pause render before completing debugger REPL
startup, but only when the initial pause is actually observed during
startup initialization.

Creating the wait promise before Runtime.runIfWaitingForDebugger() can
hang when the debug target exits or disconnects without producing an
initial pause event. It also assumes the inspector object always has
parsed CLI options, which is not true for tests that use a minimal mock
inspector.

Create the initial-render wait lazily from the Debugger.paused handler
while startup initialization is active. This preserves prompt ordering
for normal initial breaks without blocking startup when no initial pause
render occurs.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/63969
Refs: https://github.com/nodejs/node/actions/runs/27582782593/job/81546582775
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-06-22 08:58:18 +02:00
..
assert
async_local_storage lib: add lint rule to enforce use of kEmptyObject 2026-06-20 17:51:28 +02:00
bootstrap vfs: add minimal node:vfs subsystem 2026-06-20 17:50:48 +02:00
child_process child_process: serialize advanced IPC messages natively 2026-06-20 16:58:11 +02:00
cluster
console
crypto lib: fix missing lazyDOMException import 2026-06-21 00:20:27 +02:00
debugger debugger: lazily wait for initial break output 2026-06-22 08:58:18 +02:00
dns dns: coerce -0 to +0 in lookup and resolver inputs 2026-06-18 10:09:48 +02:00
encoding lib: fix typo idenity => identity 2026-05-19 14:08:21 +02:00
errors
events events: improve addAbortListener perf by caching options object 2026-06-18 10:10:45 +02:00
ffi ffi: add experimental fast FFI call API for AArch64 and x86_64 2026-06-18 10:11:23 +02:00
fs fs: do not treat EPERM as ENOTEMPTY on Windows 2026-06-21 11:20:29 +02:00
http2 lib: add lint rule to enforce use of kEmptyObject 2026-06-20 17:51:28 +02:00
inspector lib: add lint rule to enforce use of kEmptyObject 2026-06-20 17:51:28 +02:00
legacy
main watch: print name of changed file that triggers restart 2026-06-22 08:58:18 +02:00
modules lib: add lint rule to enforce use of kEmptyObject 2026-06-20 17:51:28 +02:00
per_context lib: improve control abstraction coverage in frozen intrinsics 2026-06-18 10:10:52 +02:00
perf lib: add lint rule to enforce use of kEmptyObject 2026-06-20 17:51:28 +02:00
process vfs: add minimal node:vfs subsystem 2026-06-20 17:50:48 +02:00
quic quic: expose QUIC certificates as JS X509Certificate, not raw handles 2026-06-21 00:20:28 +02:00
readline lib: add lint rule to enforce use of kEmptyObject 2026-06-20 17:51:28 +02:00
repl repl: fix dedup comparing normalized line against raw history 2026-05-19 14:08:22 +02:00
source_map
streams lib: add lint rule to enforce use of kEmptyObject 2026-06-20 17:51:28 +02:00
test
test_runner test_runner: remove unused shuffleArrayWithSeed 2026-06-18 10:10:52 +02:00
tls tls: add certificateCompression option 2026-06-20 16:58:12 +02:00
util util: fix scientific notation formatting 2026-06-18 10:11:23 +02:00
v8 lib: add lint rule to enforce use of kEmptyObject 2026-06-20 17:51:28 +02:00
vfs lib: add lint rule to enforce use of kEmptyObject 2026-06-20 17:51:28 +02:00
vm
watch_mode watch: print name of changed file that triggers restart 2026-06-22 08:58:18 +02:00
webstreams stream: fix Writable.toWeb() desiredSize for non-object-mode 2026-06-22 08:58:18 +02:00
worker lib: refactor internal webidl converters 2026-05-05 16:21:27 +02:00
abort_controller.js lib: defer AbortSignal.any() following 2026-05-05 16:19:16 +02:00
assert.js
async_context_frame.js
async_hooks.js
blob.js lib: add lint rule to enforce use of kEmptyObject 2026-06-20 17:51:28 +02:00
blocklist.js net: coerce -0 to +0 in BlockList prefixes 2026-06-18 10:09:48 +02:00
buffer.js
child_process.js child_process: pass spawn options to the binding positionally 2026-06-20 17:51:44 +02:00
cli_table.js
constants.js
data_url.js
dgram.js
encoding.js
error_serdes.js
errors.js net: early TCP binding via synchronous net.BoundSocket 2026-06-21 00:20:28 +02:00
event_target.js
ffi-shared-buffer.js ffi: add experimental fast FFI call API for AArch64 and x86_64 2026-06-18 10:11:23 +02:00
file.js
fixed_queue.js
freelist.js
freeze_intrinsics.js lib: improve control abstraction coverage in frozen intrinsics 2026-06-18 10:10:52 +02:00
heap_utils.js
histogram.js
http.js lib,test: redact proxy credentials in tunnel errors 2026-06-17 18:50:12 +02:00
inspector_async_hook.js
inspector_network_tracking.js
js_stream_socket.js
linkedlist.js
locks.js lib: refactor internal webidl converters 2026-05-05 16:21:27 +02:00
mime.js
navigator.js lib: make Navigator#language getter throw on invalid this 2026-06-18 10:09:52 +02:00
net.js net: support TCP_KEEPINTVL and TCP_KEEPCNT in setKeepAlive 2026-06-18 10:11:21 +02:00
options.js src: support multiple versions in node.config.json 2026-05-19 14:08:16 +02:00
priority_queue.js
promise_hooks.js
querystring.js
README.md
repl.js
socket_list.js
socketaddress.js
stream_base_commons.js
timers.js
trace_events_async_hooks.js
tty.js
url.js tools: enforce iterator result property order 2026-06-20 17:50:56 +02:00
util.js util: remove unused functions 2026-05-30 19:26:27 +02:00
v8_prof_polyfill.js
validators.js fs: coerce -0 to +0 in mode flags and watch intervals 2026-06-18 10:09:48 +02:00
vm.js
wasm_web_api.js
watchdog.js
webidl.js lib: optimize webidl conversion options 2026-05-19 14:08:16 +02:00
webstorage.js inspector: auto collect webstorage data 2026-05-05 16:19:18 +02:00
worker.js watch: track worker entry files in watch mode 2026-05-05 16:19:41 +02:00

Internal Modules

The modules located in lib/internal directory are exclusively meant for internal usage within the Node.js core. They are not intended to be accessed via user modules require(). These modules may change at any point in time. Relying on these internal modules outside the core is not supported and can lead to unpredictable behavior.

In certain scenarios, accessing these internal modules for debugging or experimental purposes might be necessary. Node.js provides the --expose-internals flag to expose these modules to userland code. This flag only exists to assist Node.js maintainers with debugging internals. It is not meant for use outside the project.