-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add debugger REPL #581
Comments
FWIW, Sly has this. And if I'm not terribly mistaken, so does SLIME... it's been a long time, but I think it's a question of pressing enter in the REPL and you get a new prompt. |
You're right! I haven't tested hitting Enter in the REPL; I assumed that a lack of prompt means that the REPL does not accept input. Thanks for the update. |
instafeature! |
Sounds like a UI/discoverability issue - could SLIME display a prompt here, then? Seems like quiiite a few experienced users weren't aware of this possibility 🙂 |
Yes. Discussing this discovery on |
If I remember correctly, I tried to do this back in the day, then discovered it wasn't so easy (or at least "clean"), which is one of the reasons I started rewriting the REPL for what would become Sly (which btw also shows an indicator of debugger "depth"). |
@phoe I'm working on integrating João's REPL back into SLIME. Ping me if you'd like to help. |
@luismbo I would, but I am completely out of spoons at the moment. Thank you for the porting work. |
I think you best start with the cats 🐈 , meow! |
In the default SBCL repl, we can do debugger-oriented programming like this:
This is harder to achieve in Slime because the debugger does not allow the REPL to be easily used (the
*slime-repl sbcl*
buffer blocks) which prevents us from writing the function directly in the REPL. The ways around this are using C-c C-c to compile forms in a separate thread or using the debugger'seval-in-frame
functionality, which was really not designed for that kind of use.I propose extending the current
eval-in-frame
behavior and adding a functionality that allows the debugger to drop back into the REPL at a given stack frame. The way I imagine, upon choosing such an option, the debugger buffer can disappear and control can go back into the REPL, with the prompt changed to e.g.[1] CL-USER>
to signify that we are debugging. The user can then evaluate whatever they'd like and finally evaluate some sort of keyword command, e.g.:debug
, that will get intercepted by the REPL and show the debugger buffer again. (Of course, control can also leave the debugger by means of throwing or invoking restarts, at which point the REPL returns to normal.)Benefit: interactive and debugger-oriented programming will get easier if the standard REPL is constantly available, even while debugging.
Labels:
feature-request
The text was updated successfully, but these errors were encountered: