trace-new-instances-on-access class-designator &key read write slot-names break when process trace-output entrycond eval-before before backtrace => t
Causes new instances of the class given by class-designator to be traced for the access modes given by read, write and slot-names.
The keyword arguments control which type of access are traced, and provide preconditions for tracing, code to run before access, and how to print any trace output. They are interpreted as described for trace-on-access.
This function, when used with the :break
keyword, replaces the deprecated function break-new-instances-on-access.
(trace-new-instances-on-access 'capi:display-pane
:slot-names nil)
Suppose you have a bug whereby the slot bar
of an instance of your class foo
is incorrectly being set to a negative integer value. You could cause entry into the debugger at the point where the slot is set incorrectly by evaluating this form:
(clos:trace-new-instances-on-access
'foo
:slot-names '(bar)
:read nil
:when '(and (integerp (car *traced-arglist*))
(< (car *traced-arglist*) 0))
:break t)
LispWorks User Guide and Reference Manual - 13 Feb 2015