node/lib/internal
Trivikram Kamat 1f806f2214
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 05:55:33 +00:00
..
assert
async_local_storage lib: add lint rule to enforce use of kEmptyObject 2026-06-10 10:56:56 +00:00
bootstrap vfs: add minimal node:vfs subsystem 2026-05-23 18:43:31 +00:00
child_process child_process: serialize advanced IPC messages natively 2026-06-18 18:14:46 +00:00
cluster
console
crypto crypto: move DEP0198 to End-of-Life 2026-06-21 11:18:48 +00:00
debugger debugger: lazily wait for initial break output 2026-06-22 05:55:33 +00:00
dns dns,net: reject hostnames with embedded NUL bytes 2026-06-18 06:29:24 +02:00
dtls src,lib: add dtls interop tests 2026-05-21 14:13:07 -07:00
encoding lib: fix typo idenity => identity 2026-05-13 14:22:55 +02:00
errors
events events: improve addAbortListener perf by caching options object 2026-06-08 18:00:33 +02:00
ffi ffi: add experimental fast FFI call API for AArch64 and x86_64 2026-06-16 09:35:02 +00:00
fs fs: do not treat EPERM as ENOTEMPTY on Windows 2026-06-21 01:31:38 +00:00
http2 http2: cap originSet size to prevent unbounded memory growth 2026-06-18 06:29:23 +02:00
inspector lib: add lint rule to enforce use of kEmptyObject 2026-06-10 10:56:56 +00:00
legacy
main watch: print name of changed file that triggers restart 2026-06-22 05:55:19 +00:00
modules module: enable existing machinery for deferred import of static modules 2026-06-16 20:39:20 +00:00
per_context lib: improve control abstraction coverage in frozen intrinsics 2026-06-13 17:31:17 +00:00
perf lib: add lint rule to enforce use of kEmptyObject 2026-06-10 10:56:56 +00:00
process permission: handle process.chdir on writereport 2026-06-18 06:29:23 +02:00
quic quic: expose QUIC certificates as JS X509Certificate, not raw handles 2026-06-20 20:11:47 +00:00
readline lib: add lint rule to enforce use of kEmptyObject 2026-06-10 10:56:56 +00:00
repl repl: fix dedup comparing normalized line against raw history 2026-05-15 18:02:14 +09:00
source_map lib: use Object.freeze to avoid defensive cloning in SourceMap 2026-05-19 20:30:44 +02:00
streams stream: handle setEncoding after buffered data 2026-06-20 09:35:34 +00:00
test
test_runner test_runner: remove unused shuffleArrayWithSeed 2026-06-13 09:02:10 +00:00
tls crypto,https,tls: runtime-deprecate OpenSSL engine-based APIs (DEP0183) 2026-06-19 18:03:51 +02:00
util util: fix scientific notation formatting 2026-06-16 02:30:40 +00:00
v8 lib: add lint rule to enforce use of kEmptyObject 2026-06-10 10:56:56 +00:00
vfs lib: add lint rule to enforce use of kEmptyObject 2026-06-10 10:56:56 +00:00
vm
watch_mode watch: print name of changed file that triggers restart 2026-06-22 05:55:19 +00:00
webstreams stream: fix Writable.toWeb() desiredSize for non-object-mode 2026-06-21 21:56:57 +00:00
worker
abort_controller.js
assert.js
async_context_frame.js
async_hooks.js domain: port to AsyncLocalStorage 2026-06-21 19:42:03 +00:00
blob.js lib: add lint rule to enforce use of kEmptyObject 2026-06-10 10:56:56 +00:00
blocklist.js net: coerce -0 to +0 in BlockList prefixes 2026-05-31 14:25:30 +00:00
buffer.js
child_process.js child_process: pass spawn options to the binding positionally 2026-06-20 15:45:11 +00:00
cli_table.js
constants.js
data_url.js
dgram.js
encoding.js
error_serdes.js
errors.js domain: port to AsyncLocalStorage 2026-06-21 19:42:03 +00:00
event_target.js
ffi-shared-buffer.js ffi: add experimental fast FFI call API for AArch64 and x86_64 2026-06-16 09:35:02 +00:00
file.js
fixed_queue.js
freelist.js
freeze_intrinsics.js lib: improve control abstraction coverage in frozen intrinsics 2026-06-13 17:31:17 +00:00
heap_utils.js
histogram.js
http.js lib,test: redact proxy credentials in tunnel errors 2026-06-18 06:29:23 +02:00
inspector_async_hook.js
inspector_network_tracking.js
js_stream_socket.js
linkedlist.js
locks.js
mime.js
navigator.js lib: make Navigator#language getter throw on invalid this 2026-06-02 14:25:47 +02:00
net.js net: support TCP_KEEPINTVL and TCP_KEEPCNT in setKeepAlive 2026-06-13 23:12:25 +00:00
options.js src: support multiple versions in node.config.json 2026-05-06 17:27:58 +00: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 url: fix URLSearchParams(null) to prudce null= per spec 2026-06-09 07:40:15 +00:00
util.js util: remove unused functions 2026-05-30 09:05:23 +00:00
v8_prof_polyfill.js
validators.js dns,net: reject hostnames with embedded NUL bytes 2026-06-18 06:29:24 +02:00
vm.js
wasm_web_api.js
watchdog.js
webidl.js lib: optimize webidl conversion options 2026-05-06 12:58:46 +00:00
webstorage.js
worker.js

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.