A Debugger is a REPL is a Debugger
Published on: 2025-05-23 00:06:16
A Debugger is a REPL is a Debugger
I love debuggers! The last time I used a debugger seriously was in 2017 or so, when I was still coding in Kotlin. I’ve since switched to working with native code, and, sadly gdb and lldb are of almost no help for me. This is because they are mere “debuggers”, but what I need is a REPL, and a debugger, all in one. In this article I show a more productive way to use debuggers as REPLS.
The trick boils down to two IntelliJ IDEA features, Run to Cursor and Quick Evaluate Expression.
The first feature, run to cursor, resumes the program until it reaches the line where the cursor is at. It is a declarative alternative to the primitive debugger features for stepping into, over, and out — rather telling the debugger how to do every single step, you just directly tell it where do you want to be:
The second feature, quick evaluate expression, evaluates selected test in the context of the current stack frame. Crucially, this needn’t be some pre-existing expr
... Read full article.