I pretty much only use print debugging. I know how to use a real debugger but adding print/console.log etc. keeps me from breaking context and flow.
I pretty much only use print debugging. I know how to use a real debugger but adding print/console.log etc. keeps me from breaking context and flow.
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.
0: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
JS: debugger;
C#: System.Diagnostics.Debugger.Break();
Rust: std::intrinsics::breakpoint();
Go: runtime.Breakpoint();
Zig: @breakpoint();
Spend a few days debugging in PyCharm and you'll scream when you open developer tools.
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.