Webstorm does not stop node execution when using nodemon
Webstorm 2016.3.5 does not stop node app execution (breakpoints don't work) when using nodemon. I enabled nodemon with the Run/Debug Configuration using the path to nodemon.js in the "Node parameters" section. Debugging works fine and breakpoints work when I remove nodemon. Perhaps this a node issue and not Webstorm.

Is there a better way to enable nodemon and still have debugging work? Or is there a way to set Webstorm to do the watching itself and automatically restart the node app, and not have to use nodemon?
Thank you.
Please sign in to leave a comment.
You can use Live Edit (https://blog.jetbrains.com/webstorm/2014/08/live-edit-updates-in-webstorm-9/) to hotswap changes/restart server if necessary.
Thanks for the reply. I enabled Auto in Debugger > Live Edit > Update, but it's still not restarting the server on code changes. Is there something else I need to enable?
I started the server using the Debug icon (not Run). I'm guessing that's correct.
Did you try enabling 'Restart if hotswap fails' ? When this option is enabled, WebStorm tries to restart the server if the changes cannot be applied automatically
Thanks Elena. I enabled that option, but it's still not restarting on code changes.
The event log tells me that it can't update a compiled js file because of syntax errors. I wonder if that's why it isn't restarting node. I'm investigating that now. WS reports a couple syntax errors in the js file, but they really aren't errors. The Node app runs fine and doesn't complain about errors.
what errors do you see?
>I wonder if that's why it isn't restarting node.
yes, likely
are you using ES6 syntax? May be related to https://youtrack.jetbrains.com/issue/WEB-18658
It's Typescript compiled into Javascript. Target is es6 in the tsconfig.json, and Webstorm is compiling the TS just fine. The node app runs.
it's the same issue then...
Alright, so I guess Live Edit isn't going to work for me.
But why is WS reporting a syntax error in the compiled JS when there really isn't one?
I changed my Javascript version to ES6 in Webstorm, and now Live Edit is working.
But here's another question -- I must not be understanding how the hot swap works. I was expecting to see the node app restarting in the WS console, but that doesn't happen. I do see "script reloaded" in the Event Log.
if application can be changed without restart (with hotswapping), server is not restarted, so you won't see it restarting in console
The Live Edit reload feature seems somewhat unreliable. Mine stopped working, then started again after a couple hours, then stopped. I don't see anything in the Event Log when it's not working. I didn't change any settings. Any idea what's going on there?
no idea; I'm not aware of any issues that may cause it