Skip to content

Fix and harden node debug launches - #2268

Merged
vrubezhny merged 2 commits into
eclipse-wildwebdeveloper:masterfrom
vrubezhny:debug-launch-fixes
Nov 6, 2026
Merged

vrubezhny merged 2 commits into
eclipse-wildwebdeveloper:masterfrom
vrubezhny:debug-launch-fixes

Conversation

@vrubezhny

@vrubezhny vrubezhny commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Fixes several latent issues that could make node debug launches hang
indefinitely without any diagnostics (found while testing the Node.js 26
upgrade #2265, but independent of it):

  • fix broken timeout waiting for the debug server to start (never fired,
    so a missed announcement hung the launch forever) and make its output
    parsing chunk-safe; log the debug adapter's stderr
  • bind the debug server to 127.0.0.1 explicitly, avoiding loopback
    IPv4/IPv6 mismatches on systems where localhost resolves to ::1
  • pass LD_LIBRARY_PATH to debuggees (js-debug builds the debuggee
    environment from launch parameters only, nothing is inherited)
  • bound the DAP handshake with a watchdog that cancels after 2 minutes
    and dumps thread stacks instead of hanging forever
  • TestDebug: replace unbounded waits with bounded ones and include
    console output and running node process state in failure messages

Several issues in the node debug launch path could make debug
launches hang indefinitely with no diagnostics:

- the wait for the debug server's "listening" announcement had a
  broken timeout (Duration.compareTo(...) < 3 is always true) and
  parsed each stdout chunk in isolation; fix the timeout, parse the
  accumulated output, and log the adapter's stderr
- bind the debug server to 127.0.0.1 explicitly: on systems where
  localhost resolves to ::1 the DAP server and the adapter's
  internal servers end up on different loopback families
- pass LD_LIBRARY_PATH to debuggees: the debug adapter builds the
  debuggee environment from the launch parameters only, so
  variables the runtime depends on must be forwarded explicitly
- bound the DAP attach/handshake with a watchdog that cancels the
  launch after 2 minutes and dumps thread stacks and adapter state
  instead of hanging forever (the underlying handshake wait has no
  timeout of its own)
- replace the unbounded launch-termination wait loops with
  bounded (2 min) checks so a stuck launch fails the test visibly
  instead of hanging the build
- include the launch console output (debuggee stdout/stderr as
  forwarded by the debug adapter) in failure messages
- dump the command line, state and selected environment of the
  running node processes when a debug launch fails, to diagnose
  debuggee/debug-adapter issues on remote agents
@vrubezhny vrubezhny changed the title Debug launch fixes Fix and harden node debug launches Nov 6, 2026
@vrubezhny

Copy link
Copy Markdown
Contributor Author

/request-license-review

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

/request-license-review

✔️ All licenses already successfully vetted.

Workflow run (with attached summary files):
https://github.com/eclipse-wildwebdeveloper/wildwebdeveloper/actions/runs/42146999774

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

⚠️ NPM dependency license review required

The following NPM dependencies have licenses that are not yet vetted and require a review before they can be used:

  • npm/npmjs/-/sass/1.108.0 (license: unknown, source: clearlydefined) — review request

A review request has been submitted to the Eclipse IP team for each dependency listed above (see the linked issues). These dependencies must be approved before this change can be merged.

@vrubezhny
vrubezhny merged commit 131e05d into eclipse-wildwebdeveloper:master Nov 6, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant