Hacker News new | ask | show | jobs
by breatheoften 2603 days ago
I am strong fan of debuggers as a tool — but I actually agree with some of this complaint.

I want a language that exposes debugger features as a first class language construct

Think how powerful this pattern could be:

debug(...) { ... }

if the language and runtime specified the semantics needed ...

It could be really useful to have blocks like this in the codebase:

debug(problem_related_to_x) { pause_debugger; }

You could document and then more easily return to the mental context found over time when trying to understand problems related to x ...

And you could put log () statements inside those blocks instead of break points — not stupid text output but something the debugger protocol knows how to represent and present ... these capabilities alone would exceed the utility of print() debugging while supporting all the same workflows ...

I know things like vscode’s logpoints exist — but the fact that these constructs are not représentable in the code and easily shareable really undermines their overall utility ...