New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breakpoints Don't Hit -- WebStorm #2095
Comments
If you add
Looks like something is forcing a production build during |
Found the reason in #2042. Sourcemaps should be enabled by default for any development configuration. With today's monitoring solutions available, it's also very beneficial to have hidden source maps generated for the underlying monitoring software. Making a change that makes debugging not work out of the box is completely counter-intuitive for why someone would want to use something like nx-console. |
Can you elaborate on how nx console is involved here? How could the IDE plugin generate source maps? |
I was initially quite opposed to the idea of changing the command that is invoked, tbh. |
Ultimately, we can't guarantee that whatever is run will have source maps. You can also run any arbitrary command through this debug button and those might not support source maps or be configured correctly. So while this should handle more use cases natively, it's no guarantee. |
I think this became an issue somewhere in NX 17 per this comment: #1967 (comment) My guess is that the only reason why this used to work for me was because nx-console is expecting source maps to be there and nx decided to not generate them. So, adding the flag should be the fix. |
hey! This means that I've chosen not to build logic that automatically generates source maps for those few executors that still support it. It's not worth the maintenance burden on the team & I want to reduce the amount of magic that happens. I have, however, added a periodic notification when running targets through debugging. This means that users will find the root cause of their breakpoints not hitting faster (see the PR above). I know this probably won't make you very happy, but since Nx is technology-agnostic, we can't assume too much about the things you're using and how to ensure debugging works. Thanks :) |
Current Behavior
Debugging an nx project in webstorm doesn't work. No breakpoints are ever hit.
Expected Behavior
If I set a breakpoint in debug mode, the breakpoint should hit.
Steps to Reproduce
Breakpoints hit in a regular node app in webstorm just fine.
Failure Logs / Images / Videos
Environment
NX Report complete - copy this into the issue template
Node : 18.13.0
OS : darwin-x64
npm : 8.19.3
nx (global) : 18.3.3
nx : 18.3.3
@nx/js : 18.3.3
@nx/jest : 18.3.3
@nx/linter : 18.3.3
@nx/eslint : 18.3.3
@nx/workspace : 18.3.3
@nx/devkit : 18.3.3
@nx/eslint-plugin : 18.3.3
@nx/nest : 18.3.3
@nx/node : 18.3.3
@nrwl/tao : 18.3.3
@nx/web : 18.3.3
@nx/webpack : 18.3.3
typescript : 5.4.5
Registered Plugins:
@nx/webpack/plugin
@nx/eslint/plugin
@nx/jest/plugin
The text was updated successfully, but these errors were encountered: