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.

--inspect doesn't work when used in NODE_OPTIONS

See original GitHub issue

When running this command: NODE_OPTIONS="-r esm --inspect=0.0.0.0:9229" node_modules/.bin/node-dev test_inspect.js

I get this error:

Debugger listening on ws://0.0.0.0:9229/f3bc94ca-7c83-4cd3-bc97-60b332ed4f52
For help, see: https://nodejs.org/en/docs/inspector

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
bjornstarcommented, Oct 16, 2020

Any options that aren’t for node-dev are passed on to the node process. You should be able to do node-dev --inspect=0.0.0.0:9229 test_inspect.js

0reactions
daveisferacommented, Oct 16, 2020

Oh interesting, so is there anyway to pass NODE_OPTIONS to the underlying node process then?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot use NODE_OPTIONS='--inspect' with Next.js 10.0.8
With Next.js 10.0.8, however, this command doesn't seem to work: ... Same as above, we've used the NODE_OPTIONS='--inspect' in version from ...
Read more >
Using --inspect-brk via NODE_OPTIONS - Stack Overflow
I am trying to use the NODE_OPTIONS env variable which I believe is being backported back to Node.
Read more >
ts-node - npm
Most ts-node options can be specified in a "ts-node" object using their programmatic, camelCase names. We recommend this because it works ...
Read more >
Command-line API | Node.js v19.3.0 Documentation
node --v8-options. Execute without arguments to start the REPL. For more info about node inspect , see the debugger documentation.
Read more >
2019.3 Debugger fails (doesn't attach) with node --inspect-brk ...
Given: An application which uses npm package.json scripts to fire up nodejs application package.json scripts use node --inspect-brk...
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