Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change node.js debug port?

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

like image 926
IvanM Avatar asked Sep 20 '13 06:09

IvanM


People also ask

How do I enable debug mode in node JS?

Open up Preferences > Settings and in the search box type in “node debug”. Under the Extensions tab there should be one extension titled “Node debug”. From here, click the first box: Debug > Node: Auto Attach and set the drop down to “on”. You're almost ready to go now.


1 Answers

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/

like image 183
Peter Lyons Avatar answered Sep 18 '22 23:09

Peter Lyons