Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can I have REPL that does not get stuck into debug loop? All I want is to read the error message and start again.

"Howto get out of debug-loop" is very much the same question as "howto quit vim". Takes a while to understand the cryptic "ABORT :R3" is actually the way out.



You can. First, you don't always need to type all this (is that a CCL or LispWorks prompt?). In SBCL, use only the restart number: "0". In your editor, use "q".

In SBCL, you can disable the interactive debugger. Put this in your .sbclrc:

    (defun print-condition-hook (condition hook)
      "Print this error message (condition) and abort the current operation."
      (declare (ignore hook))
      (princ condition)
      (clear-input)
      (abort))

    (setf *debugger-hook* #'print-condition-hook)
It only prints the error messages. It could be useful when experimenting with a bare-bones REPL on the terminal. For that purpose, see also sbcli and cl-repl on Github.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: