eclipse-wildwebdeveloper / eclipse-wildwebdeveloper/wildwebdeveloper

Strange output at the end of the js file debug

Open
#1,370 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
201
Forks
76
Avg merge
4d 7h
Merged PRs (30d)
21

Description

Sometimes, I get a strange output in the console at the end of debugging. The output is:

Debug server listening at 127.0.0.1:44301
{
  seq: 286,
  type: 'response',
  request_seq: 13,
  command: 'disconnect',
  success: true,
  body: {}
}
{
  seq: 287,
  type: 'response',
  request_seq: 14,
  command: 'disconnect',
  success: true,
  body: {}
}
{
  seq: 11,
  type: 'response',
  request_seq: 8,
  command: 'disconnect',
  success: true,
  body: {}
}
node:events:495
      throw er; // Unhandled 'error' event
      ^

Error: This socket has been ended by the other party
    at Socket.writeAfterFIN [as write] (node:net:569:14)
    at iv.send (/home/user/Programas/eclipse/plugins/org.eclipse.wildwebdeveloper_1.1.2.202310160731/js-debug/src/dapDebugServer.js:148:162)
    at df._send (/home/user/Programas/eclipse/plugins/org.eclipse.wildwebdeveloper_1.1.2.202310160731/js-debug/src/dapDebugServer.js:91:4596)
    at df._onMessage (/home/user/Programas/eclipse/plugins/org.eclipse.wildwebdeveloper_1.1.2.202310160731/js-debug/src/dapDebugServer.js:91:5086)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: 'EPIPE'
}

Node.js v18.18.0

It is important to note that this error is not shown every time. Sometimes it happens, sometimes it doesn't.

Steps to reproduce:

  • Create a js file with the following code:
console.log("test")
  • Put a breakpoint in the console.log line
  • Right click on the file body.
  • Select "Debug As -> Node program"
  • Press f8 to continue the debug
  • Repeat the debug several times

Sometimes the error is not shown. Sometimes only the json is shown. Sometimes only console.log output is shown.

I hope that every time the debug occurs, only the console.log output is shown.

It appears that some process is trying to write in a socket but it has already been terminated.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the repeated Node program debug steps and inspect dapDebugServer.js, especially the locations shown in the stack trace around lines 91 and 148. Compare runs that show JSON, console output, or the EPIPE error; done means repeated debugging no longer produces the reported socket error or unexpected debug responses.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.