Skip to content

Terminate/Disconnect and remove behaviour in the Debug view #1640

@jmini

Description

@jmini

Given a Generic Eclipse project a-project containing a file hello.js:

const http = require('http');

const hostname = '127.0.0.1';
const port = 3000;

const server = http.createServer((req, res) => {
  res.statusCode = 200;
  res.setHeader('Content-Type', 'text/plain');
  res.end('Hello World');
});

server.listen(port, hostname, () => {
  console.log(`Server running at http://${hostname}:${port}/`);
});

From Node.js getting started guide

And the application started with "Run as > Node Program" (or with a "Node.js application" configuration).

Screenshot 2024-08-05 at 10 36 18

The debug view looks like this:

Screenshot 2024-08-05 at 10 41 42

The "Terminate" button does not really terminates the process.

Screenshot 2024-08-05 at 10 43 21

After the "Terminate" action.

Screenshot 2024-08-05 at 10 47 39

You can not select "Remove All Terminated"

The only way to remove it from the view is to do "Terminate and Remove" and confirm in the dialog box.

"Terminate and Relaunch" will start an other instance without removing the existing one.


If you do "Disconnect" when the application is running (on the top node):

Screenshot 2024-08-05 at 10 58 50

it looks like this:
Screenshot 2024-08-05 at 11 00 44

And the process (small http server) is gone.

You can do "Remove All Terminated" or "Terminate and Remove" (the second one will not ask you to terminate).

This corresponds more to what I would expect to the "Terminate" operation


If you first do "Terminate" then the "Disconnect" operation does not have any effect.


I have also noticed that hitting "Disconnect" when the selection is on the top node or on the "Debug Adapter Target"…


I think this area has to be improved, in particular when you compare it with the one from the previous org.eclipse.wst.jsdt.nodejs.feature feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions