Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging not working in Intellij - NodeJS + NestJS App

I am trying to debug a nodejs + nest application in IntelliJ, I am able to start the application using two types of configs.

  1. Using Yarn (through NPM configuration template in intellij)
  2. Using Node (I am not sure but when I use the main.js from dist folder then I get some debug point but it is useless as it is not pointing to my actual code base)

Debugger doesn't work for any of the above options!

I am posting screen shots of both the configurations.

New to Node + IntelliJ, so not sure what did I do wrong in both the configurations! Any help would be appreciated.

Intellij Version is 2020.3.3 And NodeJS application exposes several APIs, I am trying to call the APIs using a Postman and expect it to debug.

NPM Debug Configuration

Node Debug Config

like image 911
Bilbo Baggins Avatar asked May 07 '26 18:05

Bilbo Baggins


2 Answers

Debugging in both main.ts and controllers works for me when using the configuration below:

enter image description here

enter image description here

See also https://github.com/nestjs/nest/issues/993 for some recipes

like image 198
lena Avatar answered May 09 '26 10:05

lena


May be go to package.json and u will see options here, click on the option of either to run or debug. package.json

like image 21
Suneet Srivastava Avatar answered May 09 '26 09:05

Suneet Srivastava



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!