nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.81k stars 2.38k forks source link

Debugger doesn't (IntelliJ) work after any change in watch mode [nest.js] #16730

Open qubiack opened 1 year ago

qubiack commented 1 year ago

Current Behavior

When you start a Nest.js application in debugger mode in IntelliJ (WebStorm/PHPStorm) all breaks are working correctly. After the first rebuild of the application (edit anything, even console.log message) breakpoints are not binding correctly and they don't work at all.

  "scripts": {
    "start:api": "nx serve ${projectName}",
  },

Screenshot 2023-05-03 at 17 15 21

Expected Behavior

After any change all breakpoints should work again and bind of them should be reloaded. Right now only one solution is to restart the build process.

Steps to Reproduce

  1. Create an empty NX repository
  2. Start application in WebStorm (or any JetBrains tool) as a Debugger
  3. Set a breakpoint in app.controller.ts
  4. Run GET request
  5. Application is stop correctly
  6. Add console log in the app.controller.ts file
  7. Run GET request
  8. Application doesn't stop at all

Nx Report

Node : 18.16.0
   OS   : darwin x64
   npm  : 9.5.1

   nx                      : 15.9.2
   @nrwl/js                : 15.9.2
   @nrwl/jest              : 15.9.2
   @nrwl/linter            : 15.9.2
   @nrwl/workspace         : 15.9.2
   @nrwl/angular           : 15.9.2
   @nrwl/cli               : 15.9.2
   @nrwl/cypress           : 15.9.2
   @nrwl/devkit            : 15.9.2
   @nrwl/eslint-plugin-nx  : 15.9.2
   @nrwl/nest              : 15.9.2
   @nrwl/node              : 15.9.2
   @nrwl/tao               : 15.9.2
   @nrwl/web               : 15.9.2
   @nrwl/webpack           : 15.9.2
   @nrwl/nx-cloud          : 16.0.2
   typescript              : 4.9.5
   ---------------------------------------
   Community plugins:
   @alyle/ui            : 14.0.0
   @ngrx/component      : 15.4.0
   @ngrx/effects        : 15.4.0
   @ngrx/store          : 15.4.0
   @ngrx/store-devtools : 15.4.0
KamilPodsiadlo commented 1 year ago

I have the same issue. Very annoying. My version is 16.1.1

qubiack commented 1 year ago

Do you have any progres in this?

jahumes commented 1 year ago

I have been having this issue for over a year. Are there any updates? I have tested and can get this to work with any nx node project and a blank version of Webstorm