How to change it from 5858 to 7000, for example?
Asked
Active
Viewed 4.3k times
2 Answers
138
You can use --debug
option:
node --debug=7000 app.js
You can use --inspect
option for latest node >= v8
node --inspect=7000 app.js

Theophilus Omoregbee
- 2,463
- 1
- 22
- 33

Peter Lyons
- 142,938
- 30
- 279
- 274
-
This is really useful when having Grunt run multiple concurrent tasks and still have them all debug simultaneously. – Venning Apr 10 '14 at 19:14
-
1The same syntax applies to nodemon as it passes the param through to node. – Synchro Sep 22 '15 at 09:40
8
For nodejs version >= v8 use this:
node --inspect=7000 --inspect-brk app.js

cn007b
- 16,596
- 7
- 59
- 74
-
I believe this was the case at least as far back as node v6. (But not v4.) – David Knipe Dec 01 '17 at 08:26