Hi all
I finally took some time off to do a bit on the debugger again. It can be found here:
http://www.daimi.au.dk/~metch/lisp/clim-debugger.lisp
Changes:
- A "more button" have been added, so more stack-frames can be viewed if 20 isn't enough.
- Scroll-bars have been added, thanks to Elliott Johnson. There's still a small problem though. The scroll-bars do not remember their position when a stack-frame or "more" is pressed. I don't know how to fix this, couldn't find anything in the specs and Clouseau didn't help either. Do anyone of you know how to do this?
- Frame variables are viewed with Clouseau when pressed.
What do you think?
Have fun,
-- Peter
Today, Peter Mechlenborg metch@daimi.au.dk wrote:
Changes:
A "more button" have been added, so more stack-frames can be viewed if 20 isn't enough.
Scroll-bars have been added, thanks to Elliott Johnson. There's still a small problem though. The scroll-bars do not remember their position when a stack-frame or "more" is pressed. I don't know how to fix this, couldn't find anything in the specs and Clouseau didn't help either. Do anyone of you know how to do this?
Frame variables are viewed with Clouseau when pressed.
What do you think?
I think it rocks. I found the fonts a bit unreadable on descriptive texts, so I hacked on it a little. This patch adds:
* better fonts on descriptions (not on reference-conditions reference slots yet, I'm hoping somebody figures a way to render them soon) * (maybe) better formatting of reference condition descriptions & extra condition info * better handling of multi-table-column presentation (you can now click on a stack frame number and on a restart description) * doesn't show the --MORE-- link when there are fewer than 20 frames.
Here's some lisp porn: http://boinkor.net/lisp/porn/clim-debugger_pretty.png (-:
Hope you like it. --- clim-debugger.orig.lisp 2005-04-14 19:08:32.000000000 +0200 +++ clim-debugger.lisp 2005-04-15 00:18:25.861376109 +0200 @@ -255,13 +255,14 @@ ;;; Display debugging info ;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun std-form (pane first second) +(defun std-form (pane first second &key (family :sans-serif)) (formatting-row (pane) - (formatting-cell (pane) (bold (pane) (format t "~A" first))) - (formatting-cell - (pane) - (format t "~A" second)))) + (with-text-family (pane :sans-serif) + (formatting-cell (pane) (bold (pane) (format t "~A" first)))) + (formatting-cell (pane) + (with-text-family (pane family) + (format t "~A" second)))))
(defun display-debugger (frame pane) (let ((*standard-output* pane)) @@ -269,26 +270,32 @@ (std-form pane "Condition type:" (type-of-condition (condition-info pane))) (std-form pane "Description:" (condition-message (condition-info - pane)))) + pane))) + (when (condition-extra (condition-info pane)) + (std-form pane "Extra:" (condition-extra (condition-info pane)) + :family :fix)) + (when (condition-references (condition-info pane)) + (std-form pane "References:" (condition-references (condition-info + pane)) + :family :fix))) (fresh-line) - (when (condition-extra (condition-info pane)) - (formatting-table (pane) - (std-form pane "Extra:" (condition-extra (condition-info pane)))) - (fresh-line)) - (when (condition-references (condition-info pane)) - (formatting-table (pane) - (std-form pane "References:" (condition-references (condition-info - pane)))) - (fresh-line)) - (bold (pane) (format t "Restarts:")) + + + (with-text-family (pane :sans-serif) + (bold (pane) (format t "Restarts:"))) (fresh-line) (format t " ") (formatting-table (pane) (loop for r in (restarts (condition-info pane)) - do (formatting-row (pane) - (formatting-cell (pane) (present r 'restart)) - (formatting-cell (pane) (format t "~A" r))))) + do (formatting-row (pane) + (with-output-as-presentation (pane r 'restart) + (formatting-cell (pane) + (format pane "~A" (restart-name r))) + + (formatting-cell (pane) + (with-text-family (pane :sans-serif) + (format pane "~A" r))))))) (fresh-line) (display-backtrace frame pane) (change-space-requirements pane @@ -298,7 +305,8 @@
(defun display-backtrace (frame pane) (declare (ignore frame)) - (bold (pane) (format t "Backtrace:")) + (with-text-family (pane :sans-serif) + (bold (pane) (format t "Backtrace:"))) (fresh-line) (format t " ") (formatting-table @@ -306,14 +314,17 @@ (loop for stack-frame in (backtrace (condition-info pane)) for i from 0 do (formatting-row (pane) - (bold (pane) (formatting-cell (pane) (format t "~A: " i))) - (formatting-cell (pane) (present stack-frame 'stack-frame - :view (view stack-frame))))) - (formatting-row (pane) - (formatting-cell (pane)) - (formatting-cell (pane) - (bold (pane) - (present pane 'more-type)))))) + (with-output-as-presentation (pane stack-frame 'stack-frame) + (bold (pane) (formatting-cell (pane) (format t "~A: " i))) + (formatting-cell (pane) + (present stack-frame 'stack-frame + :view (view stack-frame)))))) + (when (>= (length (backtrace (condition-info pane))) 20) + (formatting-row (pane) + (formatting-cell (pane)) + (formatting-cell (pane) + (bold (pane) + (present pane 'more-type)))))))
(define-presentation-method present (object (type stack-frame) stream @@ -329,7 +340,8 @@ (progn (princ (frame-string object) stream) (fresh-line) - (bold (stream) (format t " Locals:")) + (with-text-family (stream :sans-serif) + (bold (stream) (format t " Locals:"))) (fresh-line) (format t " ") (formatting-table
Cheers,
Andreas Fuchs wrote:
I think it rocks. I found the fonts a bit unreadable on descriptive texts, so I hacked on it a little. This patch adds:
- better fonts on descriptions (not on reference-conditions reference slots yet, I'm hoping somebody figures a way to render them soon)
- (maybe) better formatting of reference condition descriptions & extra condition info
- better handling of multi-table-column presentation (you can now click on a stack frame number and on a restart description)
- doesn't show the --MORE-- link when there are fewer than 20 frames.
Super!
Here's some lisp porn: http://boinkor.net/lisp/porn/clim-debugger_pretty.png (-:
Hope you like it.
I think I do, but I've never really used patch and I can't make it work (perhaps I'm a bit dense). I've copied the patch you provided to a file named clim-debugger.lisp-patch and tried this:
[goblin:~/lisp]$patch --verbose clim-debugger.lisp \ clim-debugger.lisp-patch Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- clim-debugger.orig.lisp 2005-04-14 19:08:32.000000000 +0200 |+++ clim-debugger.lisp 2005-04-15 00:18:25.861376109 +0200 -------------------------- Patching file clim-debugger.lisp using Plan A... Hunk #1 FAILED at 255. Hunk #2 FAILED at 270. Hunk #3 succeeded at 305. Hunk #4 FAILED at 314. Hunk #5 succeeded at 340. 3 out of 5 hunks FAILED -- saving rejects to file clim-debugger.lisp.rej Hmm... Ignoring the trailing garbage. done
Head of the patch-file:
[goblin:~/lisp]$head clim-debugger.lisp-patch --- clim-debugger.orig.lisp 2005-04-14 19:08:32.000000000 +0200 +++ clim-debugger.lisp 2005-04-15 00:18:25.861376109 +0200 @@ -255,13 +255,14 @@ ;;; Display debugging info ;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun std-form (pane first second) +(defun std-form (pane first second &key (family :sans-serif)) (formatting-row (pane)
Can anyone help me? Thanks.
-- Peter
I think I do, but I've never really used patch and I can't make it work (perhaps I'm a bit dense). I've copied the patch you provided to a file named clim-debugger.lisp-patch and tried this:
I talked to Andreas on #lisp, and it was a problem with tabs and spaces. It is fixed now, and the new version is uploaded.
-- Peter
Peter Mechlenborg writes:
I think I do, but I've never really used patch and I can't make it work (perhaps I'm a bit dense). I've copied the patch you provided to a file named clim-debugger.lisp-patch and tried this:
I talked to Andreas on #lisp, and it was a problem with tabs and spaces. It is fixed now, and the new version is uploaded.
I suggest you put it in Apps/Debugger in the McCLIM hierarchy, or ask Andreas to do so if you do not have commit privileges.
Robert Strandh wrote:
I suggest you put it in Apps/Debugger in the McCLIM hierarchy, or ask Andreas to do so if you do not have commit privileges.
I was thinking about that too. I don't have commit privileges, so if someone could do it for me that'll be great. I could also do it myself, if I was given the privileges, but that is up to you guys.
-- Peter
Peter Mechlenborg metch@daimi.au.dk writes:
Robert Strandh wrote:
I suggest you put it in Apps/Debugger in the McCLIM hierarchy, or ask Andreas to do so if you do not have commit privileges.
I was thinking about that too. I don't have commit privileges, so if someone could do it for me that'll be great. I could also do it myself, if I was given the privileges, but that is up to you guys.
Does anyone have anything against giving Peter write access? Is there an advantage in this case to going through someone else?
Cheers,
Christophe
Christophe Rhodes writes:
Peter Mechlenborg metch@daimi.au.dk writes:
Robert Strandh wrote:
I suggest you put it in Apps/Debugger in the McCLIM hierarchy, or ask Andreas to do so if you do not have commit privileges.
I was thinking about that too. I don't have commit privileges, so if someone could do it for me that'll be great. I could also do it myself, if I was given the privileges, but that is up to you guys.
Does anyone have anything against giving Peter write access? Is there an advantage in this case to going through someone else?
I certainly have nothing against that. Perhaps giving him write access would encourage him to take more time off to contribute :-)
I've checked Peter's debugger into CVS under Apps/Debugger. So, who has the power to get him write access?
On 4/15/05, Robert Strandh strandh@labri.fr wrote:
Christophe Rhodes writes:
Peter Mechlenborg metch@daimi.au.dk writes:
Robert Strandh wrote:
I suggest you put it in Apps/Debugger in the McCLIM hierarchy, or ask Andreas to do so if you do not have commit privileges.
I was thinking about that too. I don't have commit privileges, so if someone could do it for me that'll be great. I could also do it myself, if I was given the privileges, but that is up to you guys.
Does anyone have anything against giving Peter write access? Is there an advantage in this case to going through someone else?
I certainly have nothing against that. Perhaps giving him write access would encourage him to take more time off to contribute :-)
-- Robert Strandh
Greenspun's Tenth Rule of Programming: any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp.
mcclim-devel mailing list mcclim-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel