0

I am using SLIME with SBCL. Normally in SBCL, I can do (step (call-some-function 1 2 3)) and I will be able to step through/into/out of each line of code, as well as executing arbitrary expressions of my own to see what the current state of certain variables are.

But if I try to do the same in the REPL in SLIME, I get:

Evaluating call:
  (CP-GET-ALL-PE-MATCHES-ANY-LENGTH SENT-ID)
With arguments:
  581869302


   [Condition of type STEP-FORM-CONDITION]

Restarts:
 0: [STEP-CONTINUE] Resume normal execution
 1: [STEP-OUT] Resume stepping after returning from this function
 2: [STEP-NEXT] Step over call
 3: [STEP-INTO] Step into call
 4: [ABORT] Exit debugger, returning to top level.

Backtrace:
  0: (call-some-function 1 2 3)
  ...

There doesn't seem to be any way to obtain the current value of sent-id, or to evaluate (nth 1 some-list).

Is this in fact the case, and if so, does that mean I will have to fire up a second instance of SBCL in the terminal, and step through the function at the same time as in SLIME in order to get this functionality?

wrongusername
  • 18,564
  • 40
  • 130
  • 214
  • I have vague memories of having the same problem, but I can't remember how I dealt with it, and if at all. Does the same thing happen if instead of `(step ...)` you do `C-u C-c C-c` on function definition? –  Jul 25 '13 at 16:41
  • Umm... that doesn't work now :) must be some contributed library / something I used about a year or so ago, and don't have it any more. Anyways, one other thing that popped in my head: did you optimize for debugging? I think some debugging info may be lost with default settings. –  Jul 25 '13 at 17:26
  • @wvxvw thanks for the response! unfortunately i have set debug to the max (`(sb-ext:restrict-compiler-policy 'debug 3)`) and nothing has changed :( – wrongusername Jul 29 '13 at 15:05
  • I think I somehow had the stepper mentioned here: http://lists.gnu.org/archive/html/help-gnu-emacs/2007-06/msg00091.html working... it is quite possible because I wasn't very up to date / installed with apt-get on Debian (usually way behind the last version). What I usually do now is I put a `(break "break" foo bar)` in the code I want to inspect, where `foo` and `bar` are the variables I'm interested in. Though functioning step-debugger would be certainly better. –  Jul 29 '13 at 16:56
  • @wvxvw Well, I *can* step through the source code one line at a time, I just can't seem to evaluate anything at all while I'm doing it. Seems like it won't be possible for the foreseeable future. Aww. – wrongusername Jul 29 '13 at 19:08

1 Answers1

2

You can still use the REPL in SLIME when placed in the debugger, I routinely do this e.g. when errors occur. You just have to switch to the REPL buffer and type. It does not show a prompt initially, but it does once you give it an initial form.

ghollisjr
  • 153
  • 7