Skip to content
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

Debugging Local generators #13892

Closed
3 of 4 tasks
bosycom opened this issue Dec 17, 2022 · 5 comments · Fixed by #15336
Closed
3 of 4 tasks

Debugging Local generators #13892

bosycom opened this issue Dec 17, 2022 · 5 comments · Fixed by #15336

Comments

@bosycom
Copy link

bosycom commented Dec 17, 2022

Documentation issue

  • Reporting a typo
  • Reporting a documentation bug
  • Documentation improvement
  • Documentation feedback

Is there a specific documentation page you are reporting?

Debugging Local generators

Additional context or description

  1. Please add description on how to setup debugging of local generators for Jetbrains IDE such as WebStorm/PhpStorm etc. by providing a working example that actually hits the breakpoints in a generator.ts file.
  2. Following the instruction on the doc page, I could not get debugging to work correctly. VSCode hits breakpoints in den webpack JS file instead of the generator.ts file. This might be a sourceMaps issue, but I don't think that it is specific to my workspace, so any help by improving the doc is appreciated.
@FrozenPandaz FrozenPandaz added scope: misc Misc issues scope: devkit and removed scope: misc Misc issues labels Dec 20, 2022
@cameronevans
Copy link

been running into the same issue, was only able to get a source map was by uninstalling swc so it would fall back to ts-node

@isaacplmann
Copy link
Collaborator

The PR fixes item 2 in your list. I recommend opening a separate issue for item 1.

@jgarciaokode
Copy link

jgarciaokode commented Mar 1, 2023

hi @Cammisuli @AgentEnder, can you expand on how are you supposed to debug a local nx generator? Following the instructions in the docs https://nx.dev/recipes/generators/local-generators#debugging-generators does not seem to work. I only managed to get it working by invoking node --inspect-brk node_modules/@nrwl/cli/bin/nx.js generate @mapfre-tech/mar-nx:front-properties --project ang-test-app and then invoking Debug:Attach to node process command in vscode. But it is a compiled version and i can see in the docs you are supposed to debug on the same .ts you are writing code

@jgarciaokode
Copy link

jgarciaokode commented Mar 1, 2023

ok, I just realized there is a "fix" already merged in master. I checked and this commit is not in the latest version of @nrwl/nx-plugin so i guess we will have to wait for the next version

I guess with this, the problem is solved, will try it out and report back if it is not working

@github-actions
Copy link

github-actions bot commented Apr 1, 2023

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants