Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jmini opened this issue Aug 5, 2024 · 2 comments
Open

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

jmini opened this issue Aug 5, 2024 · 2 comments

Comments

@jmini
Copy link

jmini commented Aug 5, 2024

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.

@mickaelistria
Copy link
Contributor

This is most likely an issue for the LSP4E debug adapter.

@jmini
Copy link
Author

jmini commented Aug 28, 2024

Should I file an issue in https://github.com/eclipse/lsp4e?

But when I call Run As > Node program, why does it start a debug adapter? Shouldn't it be the case only in the Debug As > Node program?

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

No branches or pull requests

2 participants