🐿️
8

The 2 AM 'just use console.log' advice I kept ignoring until it saved my deadline

I spent a week building a filter form in vanilla JS and kept blaming the framework, then a buddy said 'remove all your fancy debugging and just console.log each step.' It turned out my event listener was firing twice because of a nested form tag I never checked, and ten minutes of plain logging found it. Is basic logging actually the underrated skill here or am I just late to the party?
1 comments

Log in to join the discussion

Log In
1 Comment
linda_mason82
I read a blog post the other day that said most bugs in JS come from assuming where the problem is, not the code itself. "Just use console.log" sounds too simple, but it forces you to actually trace what the browser sees instead of what you expect. Your nested form thing proves that point, a basic step by step log can beat a fancy debugger when you're blind to the real issue.
2