Debugging with IntelliJ

2023-08-17  本文已影响0人  Su9527

If you're working with IntelliJ, you can debug the app straight from the IDE by adding the appropriate configuration, as follows:

  1. Select "Edit Configurations" from the "Run" menu (or from the dropdown in the top right toolbar).
  2. Click on the + sign to add a new Configuration.
  3. Select "Attach to Node.js/Chrome".
  4. Add a descriptive name like "Debugger" in the Name field, leave default values elsewhere.
  5. Make sure you see the project directory under "Remote URLs" before saving the config.
  6. With your server running, select your new configuration and click on the Bug icon.

Once the debugger has connected to the server, you can make a request form your browser and IntelliJ will pause execution on any breakpoints you add.

More details on this can be found on JetBrain's documentation.

Refer to: https://www.jetbrains.com/help/idea/run-debug-configuration-node-js-remote-debug.html

上一篇 下一篇

猜你喜欢

热点阅读