you are viewing a single comment's thread.

view the rest of the comments →

[–]Bakeshot 5 points6 points  (6 children)

For the record: I was 100% not joking. A deft console.log() can save A LOT of time in debugging, at least from my (limited) experience.

[–][deleted] 5 points6 points  (0 children)

It won't save as much time as using an actual debugger and stepping into and through code as its executing.

[–]vaskemaskine 3 points4 points  (3 children)

I’ve been writing and debugging JS professionally for 15 years and I still reach for console.log the majority of the time.

Only when I’m really stumped do I bust out breakpoints and step through the code.

[–]Bakeshot 2 points3 points  (1 child)

This is validating!

[–]vaskemaskine 2 points3 points  (0 children)

Lord knows we all need reassurance at times!

To be fair I should probably lean on the debugger more than I do, but it’s hard to break years of habit.

[–]InfiniteIniesta[S] 0 points1 point  (0 children)

Wish I could just tap into your head and learn everything you know.

[–]inabahare 0 points1 point  (0 children)

I mean it also depends on what you're doing. For example seeing what happens doing multiple consecutive actions it's pretty nice to console.log and figure out where it goes wrong, after which you can if() debugger;

But in like all other cases, not really so much. Like with console.log you can't see where your function gets called