12 Commits
Author SHA1 Message Date
Filip Skokan d5958888cc test: deflake debugger PID attachment and cleanup
Wait for the target to finish starting before attaching the debugger.
Capture the CLI close event when it is spawned so quit() also completes
after an early exit, and terminate the target before awaiting cleanup.
Add a regression test for quitting an already exited CLI and remove the
Windows flaky entry.

Refs: https://github.com/nodejs/node/issues/63212
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66320
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-30 08:25:48 +00:00
Joyee Cheung 9495906f8b debugger: fix event listener leak in the run command
It should remove both the error and the ready event listeners
attached when either of them fires, instead of removing only
the one whose corresponding event fires, otherwise the other
event listener will always get leaked.

PR-URL: https://github.com/nodejs/node/pull/60464
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-11-07 13:28:03 +00:00
Joyee Cheung 684c3b31f0 test: capture stack trace in debugger timeout errors
Otherwise when the expected prompt does not show up in the
session and the debugger tests time out, there is not enough
information to figure out exactly which line in the test
is causing the timeout.

PR-URL: https://github.com/nodejs/node/pull/60457
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-10-31 13:18:50 +00:00
Chengzhong Wu 2bda7cbfb6 test: increase debugger waitFor timeout on macOS
PR-URL: https://github.com/nodejs/node/pull/60367
Refs: https://github.com/nodejs/node/actions/runs/18694915575/job/53309761263?pr=60343
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-10-24 14:21:32 +00:00
Dario Piotrowicz 29626f8fb8 test: update startCLI to set --port=0 by default
update the `startCLI` debugging testing utility to set by default
the port to use to `0` (i.e. a random port)

PR-URL: https://github.com/nodejs/node/pull/59042
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-07-20 17:37:28 +00:00
Yagiz Nizipli de1b34557b test: improve timeout duration for debugger events
PR-URL: https://github.com/nodejs/node/pull/56970
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
2025-02-10 23:27:08 +00:00
Philip Pfaffe 6ccb15f7ef test: adapt debugger tests to V8 11.4
Accept a new `step` break message.

PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-10-10 08:27:01 +02:00
Joyee Cheung 83cd484d77 debugger: decrease timeout used to wait for the port to be free
By default, the debugger would query the specified inspector
sever port to see if it's available before starting the server,
and it would keep retrying until a timeout (previously 9999 ms)
is reached. This timeout seems to be longer than necessary. This
patch decreases the timeout to 3 seconds.

PR-URL: https://github.com/nodejs/node/pull/44359
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>
2022-08-24 13:52:54 +00:00
gdccwxx 24f045dae2 test: replace .then chains with await
PR-URL: https://github.com/nodejs/node/pull/40348
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-10-09 17:22:39 +00:00
gdccwxx 5b4ba52786 test: fix "test/common/debugger" identify async function
PR-URL: https://github.com/nodejs/node/pull/40348
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-10-09 17:22:38 +00:00
Rich Trott ff975fe1c6 test: remove debugger workaround for AIX
Optimistically removing workaround code in the debugger test tool.

PR-URL: https://github.com/nodejs/node/pull/39296
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2021-07-09 08:28:20 -07:00
Rich Trott bed947b854 debugger: rename inspector-cli test module to debugger
PR-URL: https://github.com/nodejs/node/pull/38530
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-05-06 10:19:50 -07:00