Persisting editor and mental state across debugging sessions is really hard. It's often easier to have a single, longer debugging session.
Related Posts
Chekhov's repro: If a line of code is included in a bug report, it should contribute to the debugging somewhere.
I'm playing with DOT output for debugging syntax trees from difftastic. Here's an F# snippet, the Debug representation, and the DOT rendered as an image.
I'm pleased with the information density on the graphic, but we'll see how often I end up using it.
Today I learnt that Racket *intentionally* doesn't have a traditional REPL workflow. The authors were concerned about students not understanding the state between the current session and the code on disk.
(Arguably Jupyter has some of these features now.)
https://blog.racket-lang.org/2009/03/the-drscheme-repl-isnt-the-one-in-emacs.html