Please be aware that this is an old post, more than one year old, so you might need to look for an updated version of this article either on this site or using your favourite search engine.
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
127.0.0.1 and the default port
Now all you have to do is to run the debugger
but remember to set some of the breaking points in your app.