How to remotely debug your nodejs app using PHPStorm

There are many ways to do that, but the simplest one is to do a small tunnel to your vagrant so you can connect to it as if you are connecting to local host.

so am going to use a script I found in gist ( and yes am lazy to write it every time), so all you have to do is download it and use it as the replacement to your vagrant ssh command .

Thanks to the author.

Now you need to configure PHPStorm, to do the work, so you can go to Run -> Edit Configurations

and make sure that you create a new profile for the NodeJS remote debug like the following, and your host should be and the default port 5858

Now all you have to do is to run the debugger

but remember to set some of the breaking points in your app.

Filed under: Code

No comment yet, add your voice below!

Leave a Reply