This Node Debugger Trick Will Save You Hours

preview_player
Показать описание
🌎 Find Me Here:

#Shorts
Рекомендации по теме
Комментарии
Автор

Thanks Kyle ... I've needed this since forever 😢😂

jediofjavascript
Автор

I prefer to use node debugger in vs code. But this is really cool.

richardlenin
Автор

Your short videos teach more than any hours bootcamps

tigranpetrosyan
Автор

Learned something new. Thanks man. Definitely going to try this

dev_casper
Автор

VS Code also has this built in since ever, so you can place breakpoints and watchers in your editor, step thru the code etc.

CirTap
Автор

Wow thanks so much I completely forgot about this

MaxPicAxe
Автор

Ctrl + shift + p. type toggle. Toggle debugger. Attach to process always. You can now have breakpoints in VScode and it will work.

rishishah
Автор

This is really useful kylre, I'm learning backend using node and express. It's kinda difficult to use vscode terminal to see the console for me. Thx for the tip.

murali-krishnan
Автор

this is even more useful in fullstack frameworks like Sveltekit or Next.
in those, you need to pass it as NODE_OPTIONS env variable.
"dev": "NODE_OPTIONS='--inspect' next"

Dev-Siri
Автор

bro really likes the words actual/actually 😂

danielmartinezdev
Автор

Not just console logs, you can see the whole lexical environment and the call stack

bharatsnair
Автор

Bruh cant wait to show that to my collegues at work :P no more searching through 50 pods to find your logs :D

raphroseraph
Автор

I not usually working with node.js but I used this method a few times.

Олексій-гв
Автор

you can do something better imo, if you run the script using the built in vscode debugger you can add breakpoints like in any other debugger and you have access to the variables and call stack

chriss_jj
Автор

Wow amazing! Node log is annoying indeed

tomzhao
Автор

suggest --inspect-brk instead then you can remove the debugger; statement from your code

jjjjonathon
Автор

Damn, once I saw this way of debugging nodejs code but I didn't save it and couldn't find. Thank you

wibu
Автор

Super helpful. I wonder if it works with hot reload?

bmejia
Автор

Yeah, just run your code in the Javascript Debug Terminal instead of bash and it will do this

masonkazel
Автор

Could you make developer tools and debugging tutorial?

nages
visit shbcf.ru