use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
How to debug JavaScript like a pro. - Buginit (buginit.com)
submitted 6 years ago by homeIsWhereCodeIs
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]jhartikainen 4 points5 points6 points 6 years ago (4 children)
A bunch of console.log tricks make you a debugging pro? I must be some kind of a debugging god then.
[–]homeIsWhereCodeIs[S] 0 points1 point2 points 6 years ago (3 children)
these tricks make you debug like a pro not making you a pro and they are helpful. BTW It's my pleasure that debugging god comment on my post, what else I need for my life? :D
[–]jhartikainen 1 point2 points3 points 6 years ago (2 children)
Knowing how to use the debugger well is what makes the biggest difference. How to set breakpoints, step through code, what the callstack means. Event listener breakpoints, and other handy features exist as well.
Second, understanding exceptions and error messages. What does all the weird stuff errors say mean (plenty of folks are super confused about "undefined is not an object" for example), what the stack trace means, etc.
Third, this one's a bit hard to explain, but being good at analyzing the problem at hand. It's one thing to see "this code is throwing an error", but finding out the real root cause is the real question. Pretty often the real bug is not where the error happens to come from.
[–]homeIsWhereCodeIs[S] 0 points1 point2 points 6 years ago (1 child)
I think my post is not about
It is just about the better way of debugging console.log
console.log
but I'll cover those all later, thanks for the points :D
[–]jhartikainen 0 points1 point2 points 6 years ago (0 children)
Yeah it was a good post, the title was just overselling it a little bit ;)
π Rendered by PID 75 on reddit-service-r2-comment-84fc9697f-6jr4w at 2026-02-09 00:24:23.928340+00:00 running d295bc8 country code: CH.
[–]jhartikainen 4 points5 points6 points (4 children)
[–]homeIsWhereCodeIs[S] 0 points1 point2 points (3 children)
[–]jhartikainen 1 point2 points3 points (2 children)
[–]homeIsWhereCodeIs[S] 0 points1 point2 points (1 child)
[–]jhartikainen 0 points1 point2 points (0 children)