+(defvar *auto-eval-in-frame* t
+ #!+sb-doc
+ "When set (the default), evaluations in the debugger's command loop occur
+ relative to the current frame's environment without the need of debugger
+ forms that explicitly control this kind of evaluation.")
+
+(defun debug-eval (expr)
+ (if (and (fboundp 'compile) *auto-eval-in-frame*)
+ (sb!di:eval-in-frame *current-frame* expr)
+ (eval expr)))
+