Hacker News new | ask | show | jobs
by eggdaft 571 days 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.

2 comments

Don'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/Refe...

Browser 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.

That'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();

Agreed, but I wonder what the OP is missing in their webdev debugging journey that exists elsewhere
I 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.