February 27, 201610 yr I saw use of do-verbose function in SB's "Etude1OrchestraForumExerpt.opmo" file. To the extent I remember, it is not in common lisp and it is not documented in Opusmodus. I would like to learn about it. Regards, Rangarajan
March 18, 20179 yr Also, is it perhaps possible to globally switch off the constant tracing printout likely caused by this macro. I would prefer to only see results in the listener, and to see such tracing output only when needed for debugging. Thanks! Best, Torsten
March 18, 20179 yr I don't understand what you mean by "constant tracing printout likely caused by this macro".
March 18, 20179 yr Thanks for coming back. Pretty much all Opusmodus functions calls are traced (https://en.wikipedia.org/wiki/Tracing_(software)) in the listener, when they are called. (Apologies if the link is over the top, just want to clarify.) Example, which causes a trace of rnd-pick. (loop repeat 10 collect (rnd-pick '(1 2 3))) I understand that this can be very useful for debugging, in particular if further information is shown like the function arguments etc., but I would like to disable it by default. Is that possible perhaps? BTW: Below is the definition of a very similar tracing function, that allows to control which functions are currently traced, or to switch of tracing globally. Best, Torsten (defvar *dbg-ids* NIL "Identifiers used by dbg") ;; was once named debug, but symbol debug is already defined in common-lisp (see opimize) (defun dbg (id format-string &rest args) "Print debugging info if (DEBUG ID) has been specified" (when (member id *dbg-ids*) (fresh-line *debug-io*) (apply #'format *debug-io* format-string args))) (defun start-debug (&rest ids) "Start debug output on the given ids." (setf *dbg-ids* (union ids *dbg-ids*))) (defun stop-debug (&rest ids) ; was once named undebug "Stop debug on ids. With no ids stop debugging altogether." (setf *dbg-ids* (if (null ids) NIL (set-difference *dbg-ids* ids)))) #| ; demo (defun test (x) (tu:dbg 'test "test") (list x x)) (tu::start-debug 'test) (loop repeat 10 collect (test 1)) (tu::stop-debug) |#
Create an account or sign in to comment