Debugging feature for typescript and nodejs/nestjs in jetbrains fleet

Answered

I have cloned an opensource nodejs project from :  https://github.com/Konnect-Agri/AgriDex-Beckn

There are a lot of issues I am facing in jetbrains fleet…

I am mac Os 14 (Sonoma)

I do yarn start in terminal which starts the application in port 3003……

Then I attach to the node process by getting the pid with the following configuration

{
   "configurations": [
       {
           "type": "nodeAttach",
           "name": "Attach to Node.js process",
           "pid": 85929
       }
   ]
}

I have added breakpoints in the files but it doesnot stop at the breakpoints….. Please consider adding better documentation and run and debugging configurations for fleet for typescript/node projects as this is the largest tech stack being used everywhere, This is the only reason that is keeeping from uninstalling vscode…

 

The same procedure works fine in vscode. Run configurations used in vscode is : 

{

// Use IntelliSense to learn about possible attributes.

// Hover to view descriptions of existing attributes.

// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387

"version": "0.2.0",

"configurations": [

{

"name": "Attach",

"port": 9229,

"request": "attach",

"skipFiles": [

"<node_internals>/**"

],

"type": "node"

}

]

}

0
4 comments

Andrey Dernov , any suggestions or thoughts behind this or any one from the community?

0

You can simply Debug the package.json “start:debug” script in order for this to work:

Then loading the app in a browser hits the breakpoint:

 

As far as I can see, you don't have to create any configs manually here. If you're looking for another debugging scenario - please let me know.

We'll add the docs for NodeJS debug once they're ready.

0

Hey thanks… That worked… I am getting multiple null pointer exceptions though, but that is something off for  a new discussion. Thanks for all the help

0

It would be great if you could submit some of these NPE to our bug tracker for us to investigate & fix. I've already found a couple of bugs in the debugger thanks to your project, but perhaps there's still something that you could report.

0

Please sign in to leave a comment.