This is a feature of Gambit's interactive debugger.
From the manual: http://www.iro.umontreal.ca/~gambit/doc/gambit-c.html#Debugging
A nested REPL is then initiated in the context of the point of execution where the evaluation was stopped. The nested REPL’s continuation and evaluation environment are the same as the point where the evaluation was stopped. For example when evaluating the expression ‘(let ((y (- 1 1))) (* (/ x y) 2))’, a “divide by zero” error is reported and the nested REPL’s continuation is the one that takes the result and multiplies it by two. The REPL’s lexical environment includes the lexical variable ‘y’. This allows the inspection of the evaluation context (i.e. the lexical and dynamic environments and continuation), which is particularly useful to determine the exact location and cause of an error.
In your case, the nested REPL started inside the let
and thus had i
and j
bound.