Karl Fogel at
.@Glench, FWIW we've been doing exactly this in @Emacs for at least the
26 years that I've been using it (and I'm sure this feature set predates
my usage):
https://tinyletter.com/Flowsheets/letters/repl-debugger-replugger-a-pleasant-and-scalable-live-code-....
In many circumstances it's the default way to program.