debugger: wait for target startup - #65194
Conversation
The inspector can accept a connection before an --inspect-brk target enters its frontend wait. Runtime.runIfWaitingForDebugger can then be handled too early, allowing the target to subsequently block forever. Wait for NodeRuntime.waitingForDebugger before initializing and releasing launched targets. Race the handshake against disconnects and apply it to both interactive and probe startup. Refs: nodejs#64116 Assisted-by: codex:gpt-5.6-sol Co-authored-by: Archkon <180910180+Archkon@users.noreply.github.com> Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com> Signed-off-by: Filip Skokan <panva.ip@gmail.com>
f206372 to
821e267
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #65194 +/- ##
==========================================
- Coverage 90.32% 90.12% -0.21%
==========================================
Files 760 752 -8
Lines 248525 251780 +3255
Branches 46894 47354 +460
==========================================
+ Hits 224488 226911 +2423
- Misses 15469 16210 +741
- Partials 8568 8659 +91
🚀 New features to boost your workflow:
|
|
I ran
The A/B result suggests this likely fixes the flake, and the code looks good to me. My only non-blocking nit is the lack of a probe-mode disconnect test while |
This comment was marked as outdated.
This comment was marked as outdated.
|
Thanks for adding the probe disconnect test!
This suggests that the startup handshake may deflake debugger tests beyond Additional validation: stress test for
|
Assisted-by: codex:gpt-5.6-sol Signed-off-by: Filip Skokan <panva.ip@gmail.com>
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
The inspector can accept a connection before an --inspect-brk target enters its frontend wait. Runtime.runIfWaitingForDebugger can then be handled too early, allowing the target to subsequently block forever. Wait for NodeRuntime.waitingForDebugger before initializing and releasing launched targets. Race the handshake against disconnects and apply it to both interactive and probe startup. Refs: #64116 Assisted-by: codex:gpt-5.6-sol Co-authored-by: Archkon <180910180+Archkon@users.noreply.github.com> Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com> Signed-off-by: Filip Skokan <panva.ip@gmail.com> PR-URL: #65194 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
Landed in 2004fbd |
Important
This ought to deflake
parallel/test-debugger-profileandparallel/test-debugger-exceptions.The inspector can accept a connection before an --inspect-brk target enters its frontend wait. Runtime.runIfWaitingForDebugger can then be handled too early, allowing the target to subsequently block forever.
Wait for NodeRuntime.waitingForDebugger before initializing and releasing launched targets. Race the handshake against disconnects and apply it to both interactive and probe startup.
Refs: #64116
Assisted-by: codex:gpt-5.6-sol