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 with jetbrains run configuration doesnt seem to work with nx 17 #1967

Closed
thomasburguiere opened this issue Dec 19, 2023 · 3 comments
Labels
type: bug Something isn't working

Comments

@thomasburguiere
Copy link

thomasburguiere commented Dec 19, 2023

Current Behavior

Currently, since updating to nx 17, when starting a NX run configuration for a nest application in debug mode in Intellij or webstorm, the application doestn suspend on breakpoints.

Expected Behavior

Application execution should suspend on breakpoints

Steps to Reproduce

  • create a nx run configuration in intellij, e.g.
<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="booking-api:serve" type="NxRunConfigurationType" folderName="my apps">
    <option name="nx-projects" value="booking-api" />
    <option name="nx-targets" value="serve" />
    <option name="nx-target-configuration" value="" />
    <envs />
    <method v="2" />
  </configuration>
</component>
  • start it in debug mode;
> nx run booking-api:serve

Debugger listening on ws://127.0.0.1:53452/c7661582-a117-4038-b5fd-893544cb02d8
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Debugger listening on ws://127.0.0.1:53455/3523ff0b-982a-442e-ac86-148daf7a88f9
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Debugger listening on ws://127.0.0.1:53457/05da9610-c24c-46bf-b7eb-1775dce53ce5
For help, see: https://nodejs.org/en/docs/inspector
[debugConnectorPortPublisher] Debugger didn't connect during timeout <--- COULD THIS BE THE ISSUE??

Failure Logs / Images / Videos

Environment

IntelliJ IDEA 2023.3.1 (Ultimate Edition)
Build #IU-233.11799.300, built on December 12, 2023
Runtime version: 17.0.9+7-b1087.7 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.2
GC: G1 Young Generation, G1 Old Generation
Memory: 8000M
Cores: 10
Metal Rendering is ON
Registry:
  ide.experimental.ui=true
Non-Bundled Plugins:
  dev.nx.console (1.15.1)

nx report

 >  NX   Report complete - copy this into the issue template

   Node   : 20.10.0
   OS     : darwin-arm64
   npm    : 10.2.3
   
   nx (global)        : 17.2.1
   nx                 : 17.2.4
   @nx/js             : 17.2.4
   @nx/jest           : 17.2.4
   @nx/linter         : 17.2.4
   @nx/eslint         : 17.2.4
   @nx/workspace      : 17.2.4
   @nx/cypress        : 17.2.4
   @nx/devkit         : 17.2.4
   @nx/eslint-plugin  : 17.2.4
   @nx/nest           : 17.2.4
   @nx/next           : 17.2.4
   @nx/node           : 17.2.4
   @nx/playwright     : 17.2.4
   @nx/plugin         : 17.2.4
   @nx/react          : 17.2.4
   @nx/rollup         : 17.2.4
   @nx/storybook      : 17.2.4
   @nrwl/tao          : 17.2.4
   @nx/web            : 17.2.4
   @nx/webpack        : 17.2.4
   typescript         : 5.3.3
   ---------------------------------------
   Community plugins:
   @koliveira15/nx-sonarqube        : 3.4.0
   @trumbitta/nx-plugin-unused-deps : 1.12.1
   ---------------------------------------
   Local workspace plugins:
   	 @steiner/steiner-plugin
  • Nx Console version: 1.15.1
@thomasburguiere thomasburguiere added the type: bug Something isn't working label Dec 19, 2023
@andrekat
Copy link

andrekat commented Dec 28, 2023

facing the same issue. The only breakpoint that is hit, is a line in my custom webpack.config.js.

UPDATE: Source Maps are no longer generated @ NX 17. Just verified that by rolling back to 16.
UPDATE 2: I was able to get my debugger up & running again by following the steps provided in here: https://webpack.js.org/guides/typescript/#source-maps

@thomasburguiere
Copy link
Author

facing the same issue. The only breakpoint that is hit, is a line in my custom webpack.config.js.

UPDATE: Source Maps are no longer generated @ NX 17. Just verified that by rolling back to 16. UPDATE 2: I was able to get my debugger up & running again by following the steps provided in here: https://webpack.js.org/guides/typescript/#source-maps

Thanks @andrekat used the same approach as you, fixed everything (also a similar issue with vs code)

👍

@thomasburguiere
Copy link
Author

Seems to not really be an issue linked to the nx console extension, but rather to nx 17 itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants