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.

node --inspect/--inspect-brk incompatible with nx task runner

See original GitHub issue

Current Behavior

on node --inspect-brk ./node_modules/.bin/nx build best-app, post attach, I cannot debug due to port conflict:

Debugger listening on ws://127.0.0.1:9229/10537d99-1102-40aa-8820-a5993dce9841
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.

> nx run best-app:build
Starting inspector on 127.0.0.1:9229 failed: address already in use
Waiting for the debugger to disconnect...

Port 9229 is otherwise free–it is not used until this very node process begins.

Expected Behavior

node --inspect-brk $(yarn bin)/nx build best-app to allow me to debug my application’s build pipeline

Steps to Reproduce

reproduction and instructions can be found here: https://github.com/cdaringe/nxtester/tree/demo/no-debugging

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
jkolyercommented, Jun 4, 2021

@isaacplmann Got debugging working in VSCode. I’d be happy to collaborate on a debugging techniques document if you want to make a template I can add to.

3reactions
FrozenPandazcommented, Jun 12, 2020

Thanks for reporting the issue 😄

This is due to fork being used to run the command… We’ll have to investigate how to handle this…

If you want to debug the actual build… you should inspect the tao directly.

node --inspect-brk node_modules/.bin/tao build best-app
Read more comments on GitHub >

github_iconTop Results From Across the Web

Project Configuration - Nx
Projects can be configured in package.json (if you use npm scripts and not Nx executors) and project.json (if you use task executors). Both...
Read more >
NodeTool@0 - Node.js tool installer v0 task | Microsoft Learn
Finds or downloads and caches the specified version spec of Node.js and adds it to the PATH.
Read more >
Support for generic task execution, displaying affecting ...
When running tasks in a large repo, npm-run-all is a viable option for executing multiple tasks in parallel. However, if you want to...
Read more >
Installing grunt - Grunt: The JavaScript Task Runner
If you need a specific version of Grunt or a Grunt plugin, run npm install ... This is very bad, as new, possibly...
Read more >
@apployees-nx/level-task-runner - npm
A task runner for Nx that allows remote caches for various databases.. Latest version: 0.0.36, last published: a year ago.
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