debugger statements went out of style once chrome dev tools became awesome & no one wanted to eff up production by forgetting to remove debuggers before shipping
Dev tools is overpowered & cumbersome for most debugging problems though IMO—drop a debugger in, realize you misspelled a var & move on
So you get an error in Chrome, you switch back to your IDE, find the error line (told to you by chrome if it broke on a specific line), type debugger, relaunch / refresh, and hit the debug statement
or you get an error in Chrome, it tells you where it failed, add a break point there, refresh.
I definitely drop breakpoints in if I’m responding to an obvious surface level bug,… it’s when I’m digging into an unknown problem below the surface that I start using debuggers.
WTF is causing this weird async bug
breakpoint in chrome to find the line of the error & see if it’s obvious,… if not
WTF is causing this function to error
sometimes you gotta go to the methods of whatever class, and litter debuggers all over the effin place to see which one is called first
oh shit,… of course it’s the fucking setMoarState method
git blame
fuck, why did I write it this way again?—Probably a good reason
2
u/snifty Mar 19 '19
Debugging is embarrassing?