That said, 95% of my usual problems can be debugged with the console. Often it is faster, easier to grok and does not interrupt flow as much as a forgotten breakpoint would.
console.time, console.count, debugger; (breakpoint set in code) and $0 (code ref to highlighted html element) are super useful as well. Usually that is enough before manually setting breakpoints
also nice to know: Safari is great for (offscreen)canvas debugging
Chrome DevTools has that issue since it's always changing, adding new things, and they're not discoverable/learnable from inside of it.
If you had a drawer of 50 kitchen implements, would you even think to search for the mandoline slicer if you didn't already know about it?
I spent about a week tracking down a memory leak in our web app. About 5 days in I discovered you could compare heap snapshots which led to the root cause of a chrome bug with hidden classes. The fix was to move object spread to the bottom of an object literal.
Here’s the bug. It was a fun one to hunt: https://crbug.com/v8/13303
For what it's worth, I stick to server-side for most of my work. But occasionally I have to fix something on the front end - whether it be a UI issue in CSS/HTML or a real problem in Javascript. So a quick mention of those front-end tools available and what they do would be great. Thank you!
Because they suck. Afaik there is no way to setup triggers like
break if variable X created
break if variable Y >= 123
break before calling Z web api/method
https://developer.chrome.com/docs/devtools/javascript/breakp...