dpsTrace: -- program trace in Transcript.

Trygve Reenskaug trygver at ifi.uio.no
Tue Nov 4 17:53:15 UTC 2003


Karl,
Perhaps you could tell me how this should have been submitted. I know this 
form is all wrong, but I use the attached methods a lot for exploring other 
people's code and for debugging my own.

The methods are easy to use and remind me where I put trace commands. They 
can also show the stack, which tells me where a certain message came from.

There are three new methods to be added in Object. They do the following:

execute:
    nil dpsTrace: 'sludder'.
Transcript shows
    class name/method name (obj asString or printString)
e.g.,
    MethodContext/DoIt (sludder)

execute:
    nil dpsTrace: 'hello' levels: 5.
Transcript shows the trace message and the stack:
    1: MethodContext/DoIt (hello)
    2: Compiler/evaluate:in:to:notifying:ifFail:
    3: TextMorphEditor/evaluateSelection
    4: BlockContext/on:do:
    5: TextMorphEditor/evaluateSelection

The third form is:
    dpsTrace: reportObject levels: anInt withContext: currentContext
This is the general form, rarely used directly.

Enjoy
--Trygve


-- 

Trygve Reenskaug      mailto: trygver at ifi.uio.no
Morgedalsvn. 5A       http://heim.ifi.uio.no/~trygver
N-0378 Oslo           Tel: (+47) 22 49 57 27
Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Object-dpsTrace.st
Type: application/octet-stream
Size: 337 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031104/543c48ff/Object-dpsTrace.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Object-dpsTracelevels.st
Type: application/octet-stream
Size: 328 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031104/543c48ff/Object-dpsTracelevels.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Object-dpsTracelevelswithContext.st
Type: application/octet-stream
Size: 1071 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031104/543c48ff/Object-dpsTracelevelswithContext.obj
-------------- next part --------------



More information about the Squeak-dev mailing list