
If you need Node.js only as a local runtime for your application or for managing npm packages, running JavaScript linters, build tools, test frameworks, and so on, just install Node.js. WebStorm integrates with Node.js providing assistance in configuring, editing, running, debugging, testing, profiling, and maintaining your applications. There will be a green dot next to each of the configuration titles if they are currently running and you can stop the debugger independently of the base is a lightweight runtime environment for executing JavaScript outside the browser, for example on the server or in the command line. Run this process in debug mode simultaneously with your running project and your breakpoints should work. To run the project in nodemon debug mode, first run your app.js or equivalent file with the run button and attach the debug process by hitting the drop down and to your newly created Nodemon Debug configuration. Add the flag -debug=3001 on your nodemon Node Parameters that we set up. Hit apply and go back to your regular app configuration from the beginning of the post. It is important that the port is not the same port that your node app is running on as this is a separate process that you will launch after running your app normally. Name it whatever you would like and add host: local host and port: 3001.

To fix this, we have to create a new remote debug configuration.Ĭlick add debug configuation (the little + sign on the top left of the edit config window) and navigate down to Node.js Remote Debug. If you try to debug your app while launching from nodemon, Webstorm does not recognize your breakpoints. Now in the Edit Configuations window, add the path to your nodemon install (in my case it was /usr/local/bin/nodemon and it probably is yours too), hit apply, and your project should run using nodemon when you hit the run button. This will return the path you will need it for the next step. If you don’t know where your nodemon package is installed, simply open terminal and type which nodemon. To run your project with nodemon, simply add its path to the Node parameters in the Edit Configuration section at the top of the screen next to the run button.

For those of you who haven’t tried nodemon, it’s a small package that automatically restarts your node project when it detects a file change allowing for quick debugging. I recently switched to the Webstorm IDE, and found that I couldn’t run the debugger when using nodemon to run my project.
