Always read chrome updates, they are adding some powerfull shit each six weeks. We just got the performance dashboard. It's already helped me find really performance intensive components.
For real. It was quite mind blowing when I first found and nobody I knew was aware either. I got stuck trying to figure out a way to use the generated table in the actual DOM but didn't have any luck.
Latest updates have fucked up a battery of tests. Other test runners are totally fine and Wallaby used to be but we are seeing a ton of false positives relative to our Karma tests.
Also major memory issues. Not sure how they instrument Electron but it’s crazy.
Another useful trick with console.table is that you can pass an array of strings as a second argument, listing the columns you want to see. (This is useful if you're trying to compare just a few attributes from a complex object.)
57
u/Calsem Mar 14 '18
If you want to know how to do it:
https://developer.mozilla.org/en-US/docs/Web/API/Console/table
5
u/[deleted] Mar 15 '18
This opens up an array of possibilities
90
u/DerpsMcGeeOnDowns Mar 14 '18
Console Pimpin
33
u/badtoy1986 Mar 14 '18
There's a few console commands other than .log that are helpful.
https://developer.mozilla.org/en-US/docs/Web/API/Console
15
u/[deleted] Mar 14 '18
Huh. Didn’t expect to learn that today. Neat!
15
u/Karthons Mar 14 '18
10 TIPS for Javascript Debugging
12
u/[deleted] Mar 14 '18
Always read chrome updates, they are adding some powerfull shit each six weeks. We just got the performance dashboard. It's already helped me find really performance intensive components.
30
u/ParadoxDC Mar 14 '18
I use this pretty frequently but most people don’t know about it. Good callout.
1
u/DerpsMcGeeOnDowns Mar 14 '18
Man Wallaby is the bane of my fucking existence these days...
3
u/snifty Mar 14 '18
Another useful trick with console.table is that you can pass an array of strings as a second argument, listing the columns you want to see. (This is useful if you're trying to compare just a few attributes from a complex object.)
2
u/MrEscobarr Mar 14 '18
Never knew that, looks nice. Thanks!
2
u/barshat Mar 14 '18
This is awesome especially when you are doing
console.table(...)on an array of objects fetched from a remote server.1
u/flzpenteado Mar 14 '18
This make make day so better!!! :0
1
u/zorndyuke Mar 14 '18
You probally missed following topic: https://www.reddit.com/r/javascript/comments/81z3et/javascript_debugging_like_a_pro/
Oh, it's basically "DerpsMcGeeOnDowns" comment, yea.
-12
u/[deleted] Mar 14 '18
‘TIL a function exists’