question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when running Node in debug mode

See original GitHub issue

If I try to use this module with Node in debug mode (started with node --debug --nolazy ./index.js) I get the following error:

Error: listen EADDRINUSE :::5858
    at Object.exports._errnoException (util.js:1012:11)
    at exports._exceptionWithHostPort (util.js:1035:20)
    at Agent.Server._listen2 (net.js:1252:14)
    at listen (net.js:1288:10)
    at net.js:1398:9
    at _combinedTickCallback (internal/process/next_tick.js:77:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
danieledscommented, Oct 7, 2016

I know, I’ve read the code before opening this issue. I’m not here to waste my time, and yours neither.

Just change this line to:

this.child = fork(worker, [], {execArgv: []});

and it’s fixed.

And as a personal suggestion: stop being a dick with the people who contribute to improve your work.

1reaction
avoidworkcommented, Mar 27, 2017

There is a caveat, because this is not in the ctx most people assume the default cwd is of the process that spawns the worker. It’s not possible to solve it in such a way that works for everyone without removing the vm context which kinda breaks the API and would be a value hit.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I debug node.js errors when my code is nowhere in ...
You can try using something like longjohn which will attempt to maintain stack traces across async boundaries ( setTimeout , process.nextTick , ...
Read more >
socket in use error when running node in debug mode - IBM
running node in debug mode in the PASE shell on IBM i. Getting message: unable to open devtools socket. node --inspect --debug-brk /home/njs/server1.js....
Read more >
Debug Node.js Apps using Visual Studio Code
The Visual Studio Code editor includes Node.js debugging support. Set breakpoints, step-in, inspect variables and more.
Read more >
Debugger unable to attach to node process (node ... - GitHub
Run a nodejs script with node version 0.12.12 (node --debug test.js); Try to attach to the process. Fails to attach with error: Attach...
Read more >
Debugging - Getting Started - Node.js
Spawn child process to run user's script under --inspect flag; and use main process to run CLI debugger. Listen on port port (default:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found