7 ms·
I only use print debugging when working on the web, and your mention of console.log makes me think maybe you're in the same boat. It's an absolutely damning in
by eggdaft 2y ago
I only use print debugging when working on the web, and your mention of console.log makes me think maybe you're in the same boat.
It's an absolutely damning indictment of the developer experience for the web that this is the case. Why aren't our IDEs and browsers beautifully integrated like every other development environment I use integrates the runtime and the IDE?
Why hasn't some startup, somewhere, fixed this and the rest of the web dev hellscape? I don't know.
- bbkane 2y agoDon't browsers have some of the best dev tools out there? For example, you can use the `debugger`[0] statement in your JS code to trigger the in-browser debugger when that statement is hit (its basically setting a breakpoint). 0: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- do_not_redeem 2y agoThat's table stakes for a programming language these days I think. JS: debugger; C#: System.Diagnostics.Debugger.Break(); Rust: std::intrinsics::breakpoint(); Go: runtime.Breakpoint(); Zig: @breakpoint();
- bbkane 2y agoAgreed, but I wonder what the OP is missing in their webdev debugging journey that exists elsewhere
- eggdaft 2y agoBrowser debugging tools are very basic. Their UI is generally awful. Spend a few days debugging in PyCharm and you'll scream when you open developer tools.
- gregjor 2y agoI have always used print debugging, since way before web dev existed. I resort to an actual debugger only occasionally. Some IDEs do have integrated JS runtimes, so you can use a debugger in the IDE. However since JS runs on browsers and devices out of your control that only works up to a point.