Skip to content

Commit 540f7e3

Browse files
committed
new util: BlockClosure>>#traceAndDebugOnce
1 parent 4bee159 commit 540f7e3

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*TraceDebugger-UI-debugging
22
debugTrace
3+
"Open a trace debugger on the receiver that is ready for evaluating it step by step."
34

45
^ TraceDebugger openForBlock: self
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*TraceDebugger-UI-debugging
2+
traceAndDebugOnce
3+
"Evaluate the receiver and answer the result. Trace the evaluation and display the result in a trace debugger unless we already done it once, similarly to #haltOnce."
4+
5+
| result |
6+
self haltOnceEnabled ifFalse: [^ self value].
7+
self clearHaltOnce.
8+
[result := self value] traceAndDebug.
9+
^ result

packages/TraceDebugger.package/BlockClosure.extension/methodProperties.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"class" : {
33
},
44
"instance" : {
5-
"debugTrace" : "ct 12/31/2021 00:54",
6-
"traceAndDebug" : "ct 1/24/2022 21:24" } }
5+
"debugTrace" : "ct 12/28/2023 23:54",
6+
"traceAndDebug" : "ct 1/24/2022 21:24",
7+
"traceAndDebugOnce" : "ct 12/28/2023 23:56" } }

0 commit comments

Comments
 (0)