3 ms·
In my head, there is this (incomplete) concept that I call "functional debugging" (for a lack of a better term). Current debuggers are oriented very imperativel
by js8 6y ago
In my head, there is this (incomplete) concept that I call "functional debugging" (for a lack of a better term). Current debuggers are oriented very imperatively, i.e. here's what's bound to happen and here you see it happening, step by step.
I would like a debugger that would let me set up some query about the evaluation inside the program, for example, find me all input data in this test run that caused the output of a given function/expression to be such and such (possibly another data set produced during the debugging). Find me what are the typical inputs to the function. And so on.
One of the ideas would be instead of having breakpoints set to a place of execution, they would be set to passed values or program state. This is much more sensible in the world of functional programming, and processing of large amounts of data.
I can imagine a system like that to replace print debugging for me, but until then.. I find it easier to print.
- rasz 6y agoIll settle for ability to rewind. Whats the difference between console.log(somevariable) and breaking on that variable if the outcome is the same - me rewriting and running again?
- db48x 6y agoPernosco is that debugger. It builds a huge database of every recorded state of the program, and lets you query it. Here’s an example: https://pernos.co/about/expressions/ https://pernos.co/about/expressions/ Notice how the user clicked on a line number, and a window opened that shows every execution of that line. It’s not a breakpoint where you see only a single point in time; instead you see all the points in time. He then types in an expression, printing the value of the named variable at every single one of those points. Lastly, he types in a condition expression, narrowing the list to examine just the calls for a specific object.