[ENH] dpsTrace: -- program trace in Transcript.

Karl Ramberg karl.ramberg at chello.se
Tue Nov 4 20:23:46 UTC 2003



Trygve Reenskaug wrote:
> 
> 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.

In the subject line add a [ENH] in beginning, marking it as a enhancement.

The methods should be sendt as a gzipped change set, with a preamble
with your
description of the enhancement.

'From Squeak3.7alpha of ''11 September 2003'' [latest update: #5501] on
4 November 2003 at 9:20:47 pm'!
"Change Set:		dpsTrace
Date:			4 November 2003
Author:			Trygve Reenskaug

I use these 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"!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dpsTrace.3.cs.gz
Type: application/octet-stream
Size: 1069 bytes
Desc: Unknown Document
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031104/0f419025/dpsTrace.3.cs.obj


More information about the Squeak-dev mailing list