IvanM
IvanM

Reputation: 3053

How to change node.js debug port?

How to change it from 5858 to 7000, for example?

Upvotes: 86

Views: 47141

Answers (2)

Peter Lyons
Peter Lyons

Reputation: 146014

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/

Upvotes: 144

cn0047
cn0047

Reputation: 17071

For nodejs version >= v8 use this:

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

Upvotes: 8

Related Questions