Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js Debugger ends as soon as it is attached

I'm currently using WebStorm as IDE and my project uses pm2 as process manager. The structure of my ecosystem is the following:

module.exports = {
  name: 'myProject',
  cwd: __dirname,
  script: 'npm',
  args: 'run start:debug',
};

which executes

"start:debug": "nodemon --config nodemon-debug.json"

As soon as the project starts, the terminal throws:

Debugger listening on ws://127.0.0.1:9229/24bd6549-1601-4b0d-9e36-495765176abc
For help, see: https://nodejs.org/en/docs/inspector

I then press the Debug button in WebStorm with the following configuration:

enter image description here

After that the terminal shows this and the project starts without debugger:

Debugger listening on ws://127.0.0.1:9229/24bd6549-1601-4b0d-9e36-495765176abc
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Debugger ending on ws://127.0.0.1:9229/24bd6549-1601-4b0d-9e36-495765176abc
For help, see: https://nodejs.org/en/docs/inspector

My node version:

nvm current -> v14.20.1

Yesterday it worked fine, today I turned on my PC and it is broken, nothing on my environment has changed that I'm aware of.

like image 836
Jhoan Nicolas Andres Becerra Q Avatar asked Apr 18 '26 01:04

Jhoan Nicolas Andres Becerra Q


1 Answers

It turns out the last version of WebStorm, 2022.3.3, broke the WebStorm debugger, I had to go back to version 2022.3.2.

like image 192
Jhoan Nicolas Andres Becerra Q Avatar answered Apr 19 '26 18:04

Jhoan Nicolas Andres Becerra Q



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!