How to change node.js debug port? How to change node.js debug port? node.js node.js

How to change node.js debug port?


You can use --debug option:

node --debug=7000 app.js

You can use --inspect option for latest node >= v8

node --inspect=7000 app.js

https://nodejs.org/en/docs/inspector/


For nodejs version >= v8 use this:

node --inspect=7000 --inspect-brk app.js


in unix command line just try this

 $ PORT=7000 node --debug app.js