WebStorm Node.js debug with Docker

I'm trying to debug a Node.js script with WebStorm 2019.3 and Docker as a remote Node interpreter. So far I can start the script and debug it, but any changes done on local do not trigger a nodemon restart of the script inside the Docker container (files inside the container ARE actually changing, I've checked).

Any ideas? I'll attach the WebStorm run config.

I think there is something wrong about the way that I'm using nodemon when starting the script, but I have no idea how to fix it for WebStorm config.

0

does it work if you remove the --watch argument?

0

The same result, I can run the scripts, debug, but nodemon will not restart the script on file changes.
PS: I'm on a windows 10 machine.

 

0

Try running nodemon with --legacy-watch (see https://github.com/remy/nodemon#application-isnt-restarting), seems that Docker for Windows doesn't propagate file system events to VM

 

1

Thank you! Using legacy watch solved the problem!

0

请先登录再写评论。