Commit 1f806f2
authored
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: #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>1 parent ac6ee05 commit 1f806f2
1 file changed
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
380 | 381 | | |
381 | 382 | | |
382 | 383 | | |
| 384 | + | |
| 385 | + | |
383 | 386 | | |
384 | 387 | | |
385 | 388 | | |
| |||
890 | 893 | | |
891 | 894 | | |
892 | 895 | | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
893 | 903 | | |
894 | 904 | | |
895 | 905 | | |
| |||
910 | 920 | | |
911 | 921 | | |
912 | 922 | | |
913 | | - | |
| 923 | + | |
914 | 924 | | |
915 | 925 | | |
916 | 926 | | |
| |||
919 | 929 | | |
920 | 930 | | |
921 | 931 | | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
922 | 936 | | |
923 | 937 | | |
924 | 938 | | |
| |||
1186 | 1200 | | |
1187 | 1201 | | |
1188 | 1202 | | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
1189 | 1206 | | |
1190 | 1207 | | |
1191 | 1208 | | |
| |||
1194 | 1211 | | |
1195 | 1212 | | |
1196 | 1213 | | |
1197 | | - | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
1198 | 1220 | | |
1199 | 1221 | | |
1200 | 1222 | | |
| |||
0 commit comments