| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Does anyone use the ECL (Embedded Common Lisp) implementation here? I'm interested to know if there's a way to disable the debugger there (I know how to do it in SBCL). Especially when you are building an image, how is it possible to create that image without the debugger? I searched on their site but there is no detailed documentation there. Thanks. |
|
#2
| |||
| |||
| På Wed, 20 Aug 2008 17:18:25 +0200, skrev Francogrex <franco@grex.org>: > Does anyone use the ECL (Embedded Common Lisp) implementation here? > I'm interested to know if there's a way to disable the debugger there > (I know how to do it in SBCL). Especially when you are building an > image, how is it possible to create that image without the debugger? I > searched on their site but there is no detailed documentation there. > Thanks. This is a standard Common Lisp way of sidestepping the debugger. I don't know of any way to remove the debugger from the ECL image. (defun alternative-debugger-hook (condition hook) (declare (ignore hook)) (when (find-restart 'abort condition) (format t "~%ERROR: ~A~1%" condition) (abort condition))) (defun trap-repl-condition (on-off) (if on-off (setf *debugger-hook* #'alternative-debugger-hook) (setf *debugger-hook* nil))) (trap-repl-condition t) -------------- John Thingstad |
|
#3
| |||
| |||
| On Aug 20, 5:37*pm, "John Thingstad" <jpth...@online.no> wrote: > This is a standard Common Lisp way of sidestepping the debugger. > I don't know of any way to remove the debugger from the ECL image. > > (defun alternative-debugger-hook (condition hook) > * (declare (ignore hook)) > * (when (find-restart 'abort condition) > * * (format t "~%ERROR: ~A~1%" condition) > * * (abort condition))) > > (defun trap-repl-condition (on-off) > * (if on-off > * * * (setf *debugger-hook* #'alternative-debugger-hook) > * * (setf *debugger-hook* nil))) > > (trap-repl-condition t) OK thanks, inspired by your code and a little search in google using some of your keywords I came up with something for ECL specific (I think) it's below, I share with others. (defun invoke-debugger/disabled (condition) (flet ((failure-quit (&key recklessly-p) (quit))) (handler-case (progn (format *error-output* "~&~@<unhandled condition (of type ~S): ~2I~_~A~:>~2%" (type-of condition) condition) (finish-output *error-output*) (format *error-output* "~%unhandled condition in --disable-debugger mode, quitting~ %") (finish-output *error-output*) (failure-quit)) (condition () (ignore-errors (%primitive print "Argh! error within --disable-debugger error handling")) (failure-quit :recklessly-p t))))) (defun disable-debugger () (setf invoke-debugger #'invoke-debugger/disabled *debug-io* *error-output*)) (disable-debugger) |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.