nrwl / nx

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

Webstorm debugger ignores breakpoints after hot-swap in nx app #23187

Open jahumes opened 5 months ago

jahumes commented 5 months ago

Current Behavior

Breakpoints work for node/express applications just fine on the initial load, but when using an nx mono-repo workspace and after a hot-reload, Webstorm loses track of the breakpoints and no longer stops on the breakpoints. I have tested this with a fresh install of Webstorm and a fresh install of nx. This works just fine with VS Code.

Expected Behavior

Debugger works after a rebuild of the webpack dev-server

GitHub Repo

https://github.com/jahumes/test-nx-webstorm-breakpoints

Steps to Reproduce

  1. Install the attached project or create a new express standalone project with npx create-nx-workspace
  2. Run npm install
  3. Open a project in Webstorm
  4. Add a breakpoint to line 9 of main.ts
  5. Create a new configuration for npm run start
  6. Debug the new configuration
  7. Open the browser to http://localhost:3000
  8. You will see the breakpoint be activated
  9. Continue the debugger until the response is received in the browser
  10. Edit line 9 and change the message string to Hello API 2
  11. The process console will refresh the application
  12. Refresh the browser, and the breakpoint will not be hit. The breakpoint still has the checkmark that signifies the debugger can see it.

Nx Report

NX   Report complete - copy this into the issue template

Node   : 20.11.1
OS     : win32-x64
npm    : 10.2.4

nx (global)        : 18.0.5
nx                 : 18.3.4
@nx/js             : 18.3.4
@nx/jest           : 18.3.4
@nx/linter         : 18.3.4
@nx/eslint         : 18.3.4
@nx/workspace      : 18.3.4
@nx/devkit         : 18.3.4
@nx/esbuild        : 18.3.4
@nx/eslint-plugin  : 18.3.4
@nx/node           : 18.3.4
@nrwl/tao          : 18.3.4
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
@nx/jest/plugin

Failure Logs

No response

Package Manager Version

No response

Operating System

Additional Information

No response

jahumes commented 4 months ago

Any update?

jahumes commented 3 weeks ago

Any update?

robinalexandre commented 2 weeks ago

Any news on this ?