-
Notifications
You must be signed in to change notification settings - Fork 331
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
Debugger REPL #783
Comments
If you have a question about SLY, you can ask in SLY's tracker, so you get the benefit of addressing me directly ;-) AFAIR this is what I meant by my contributions to that issue. I've just run this experiment, as documented in the screenshot. But this doesn't mean that typing things on the REPL on the right means the same as typing |
@joaotavora Heh, sorry, I thought since you mentioned that it should be part of SLIME, I didn't want to come double post on your repo as well :) but thanks for the response. Here's an example where I've defined a function called I did notice though, that before I evaluated the function, I accidentally tried to call it, and when it opened the debugger to tell me that the function didn't exist it did behave like you show here in that it showed the |
It seems to be some sort of problem with Here's the code: (defun my-func (a)
(declare (optimize (debug 3)))
(let ((y 5))
(prog1
(+ y
(* a 2))
(error "Yoooo")))) Compare to if I just run it with SBCL directly in the shell:
So clearly it can work. I'm just wondering if this functionality is exposed either in SLIME or SLY. |
Not 100% sure about SLIME, but I am about am about SLY, and no it's not exposed there. As to the difference with |
In #581, @phoe suggested the ability to have a REPL inside the context of a stack frame. It seems like this is the default behavior of the SBCL REPL and ECL REPL when run from a command line, as you can access all locals and evaluate whatever you want.
You can kind of achieve this in SLIME by pressing e on a stack frame and then typing an S-expression into the minibuffer, so it's technically feasible, but it's not good enough. It would be extremely, extremely handy to have a full REPL, and be able to use C-x C-e, and all the available evaluation hotkeys in our source file, in the context of a stack frame.
In that issue, @joaotavora indicated that Sly has this feature and so does SLIME; he said to just press enter at the REPL with the debugger open and that's it. I tried with both SLIME and SLY and found that in SLIME, the REPL does let you continue evaluating forms, but it's not in the context of any particular stack frame, it's just the normal toplevel. In SLY, the REPL says that it's busy and you can't type anything at all. So was he just mistaken, or did the code change since then and it's different now, or am I missing something?
I'm wondering if this feature exists or what would be needed to make it exist, since I think this would be an absolutely fundamental and liberating change of the way I'm debugging stuff right now.
The text was updated successfully, but these errors were encountered: