nestjs-blog icon indicating copy to clipboard operation
nestjs-blog copied to clipboard

Debugging

Open culttm opened this issue 6 years ago • 7 comments

Hi! The great example, but i have a question. How do you debug nest applications? Do you use intellij Idea?

culttm avatar Nov 16 '18 07:11 culttm

I usually use tsc. But the nestjs-flub package might be what you're looking for. However it needs updating for nest 5+

bashleigh avatar Nov 16 '18 09:11 bashleigh

Thanks, but i don't understand how to run a breakpoint listener in the IDEA :(

culttm avatar Nov 16 '18 10:11 culttm

not something I ever use to be honest. However webstorm seems to have some docs on it? https://www.jetbrains.com/help/webstorm/2017.1/running-and-debugging-node-js.html

This one seems handy! https://blog.jetbrains.com/webstorm/2017/09/debugging-node-js-apps-in-webstorm/

bashleigh avatar Nov 16 '18 10:11 bashleigh

Thanks)

culttm avatar Nov 16 '18 10:11 culttm

get it working?

bashleigh avatar Nov 16 '18 11:11 bashleigh

Unfortunately not yet, those docs don't cover our cases... i will tell you when i get it working... hopefully ))

culttm avatar Nov 16 '18 11:11 culttm

For Webstorm, this might help. Might be worth trying to combine it with the nodemon-debug info below:

For VS Code, take a look at nodemon-debug.json from the Nest.js Typescript Starter.

Additionally, there is a start:debug task in the package.json: "start:debug": "nodemon --config nodemon-debug.json",

In VS Code, you then go to Code -> Preference and search for 'auto-attach'. Enable auto-attach and you are good to go!

nicholaspretorius avatar Dec 31 '18 17:12 nicholaspretorius