Node for Visual Studio with Nodemon

649 views Asked by At

I'm currently using Node Tools for Visual Studio (NTVS), and i'm currently attempting to use nodemon to restart the Node application upon code change.

I've implemented nodemon in the VS project settings, which works initially. The server starts using nodemon and debugging in VS works.

However when nodemon actually restarts the Node application on code change, Visual Studio assumes debugging has stopped.

Is there any way to keep Visual Studio debugging whilst nodemon is restarting the Node app?

Anybody been successful in getting nodemon to work in Visual Studio?

For reference on how-to make a Node VS project start with nodemon:

  1. Open your Project Properties ("PROJECT" > "YourApp Properties...")
  2. Point the "Node.exe path" to nodemon.cmd (click on the button right of the input field, enter "%AppData%\npm\" in the adress bar, show all files, select "nodemon.cmd", save the properties form)
1

There are 1 answers

1
Aruna On

You can try the following,

  • Open your Project Properties ("PROJECT" > "Your App Properties...")

  • Point to the "Node.exe path" to nodemon.cmd (click on the button right of the input field, enter "%AppData%\npm\" in the address bar, show all files, select "nodemon.cmd", save the properties form)

Start debugger, or use "start without debugging" (Ctrl+F5)

SO Reference: https://stackoverflow.com/a/29314782/7055233