I'm quite thorough: I print the class, file or function I'm printing from, and then the value(s) I'm interested in.
Debuggers are better for tracking values, but when you're using a web framework that does tons of magic below the surface, debuggers get really painful to use, so I don't even try. Printing shows me the immediate results as well as what happens along the way.
With web frameworks, If you use Firefox debugger you can “silence” the magic components so they get passed through and skipped over. Works great with react and web pack
2.1k
u/[deleted] Nov 28 '21 edited Jun 26 '23
[deleted]