T
13
c/coding-for-beginnersangela_wilson78angela_wilson7829d agoProlific Poster

Why does nobody talk about using print statements to debug JavaScript in VS Code?

I was stuck on a loop for 45 minutes at my desk today, so I just started throwing console.logs everywhere to see where my variable was breaking, and it finally clicked. Has anyone else found a better trick for tracing issues without using a full debugger?
2 comments

Log in to join the discussion

Log In
2 Comments
sullivan.john
Nothing fancy but adding a watch expression in the debug panel helped me skip the print statements.
1
terry_hayes18
Watch expressions just clutter the panel, print statements are fine.
7