Atul Agrawal
Atul Agrawal

Reputation: 1520

How to debug two node applications at same time using node's built-in debugger?

I debug my node applications by executing node debug app in my application folder.However if i want to use the same with other application at same time it shows me error.

How can i use debug with the other application too?

Upvotes: 1

Views: 346

Answers (1)

cviejo
cviejo

Reputation: 4398

Node's default debug port is being used by the first process. Start your second app specifying another port using the --debug-brk or the --debug flag like this:

node --debug-brk=5859 app.js

Then open another terminal window and connect to the second process's debugging port using:

node debug localhost:5859

Upvotes: 2

Related Questions