--- a/DebugView.st Tue Mar 26 12:18:01 2013 +0100
+++ b/DebugView.st Tue Mar 26 15:19:53 2013 +0100
@@ -29,7 +29,7 @@
isStoppedAtHaltOrBreakPoint exceptionInfoLabel methodCodeToggle
methodCodeToggleSelectionHolder
isStoppedAtBreakPointWithParameter breakPointParameter
- hideSupportCode'
+ hideSupportCode contextInfoLabel'
classVariableNames:'CachedDebugger CachedExclusive OpenDebuggers MoreDebuggingDetail
DebuggingDebugger DebuggingDebugger2
DefaultDebuggerBackgroundColor InitialNChainShown IgnoredHalts
@@ -444,7 +444,7 @@
^ self
enter:ex returnableSuspendedContext
- withMessage:ex descriptionForDebugger
+ withMessage:('[',ex originalSignal class name,']: ',ex descriptionForDebugger)
mayProceed:(ex mayProceed).
!
@@ -2496,14 +2496,15 @@
initialize
|menu menuPanel mH panel bpanel bH bpanel1 bH1 bpanel2 bH2 codePanel
- newLayout v exceptionAndTogglePanel codeToggleLabels|
+ newLayout v exceptionAndTogglePanel codeToggleLabels userPrefs|
super initialize.
font := font onDevice:device.
-
- verboseBacktrace := UserPreferences current verboseBacktraceInDebugger ? false.
- hideSupportCode := UserPreferences current hideSupportCodeInDebugger ? false.
+ userPrefs := UserPreferences current.
+
+ verboseBacktrace := userPrefs verboseBacktraceInDebugger ? false.
+ hideSupportCode := userPrefs hideSupportCodeInDebugger ? false.
ignoreBreakpoints := true. "/ ignore halts/breakpoints in doIts of
"/ the debugger
@@ -2527,7 +2528,7 @@
mH := menuPanel preferredHeight.
menuPanel origin:(0.0 @ 0.0) corner:(1.0 @ (mH)).
- newLayout := UserPreferences current useNewLayoutInDebugger.
+ newLayout := userPrefs useNewLayoutInDebugger.
newLayout ifFalse:[
bpanel := HorizontalPanelView in:self.
@@ -2556,6 +2557,10 @@
bpanel1 := HorizontalPanelView in:self.
self initializeButtons1In:bpanel1.
+ contextInfoLabel := Label label:''.
+ contextInfoLabel adjust:#left.
+ bpanel1 add:contextInfoLabel.
+
bH1 := bpanel1 preferredHeight + 5.
bpanel1 origin:(0.0 @ mH)
extent:(1.0 @ bH1).
@@ -3089,7 +3094,7 @@
exceptionInfoLabel notNil ifTrue:[
exceptionInfoLabel
label:(resources
- string:'Exception: %1 in process %2 [%3]%4'
+ string:'%1 in process %2 [%3]%4'
with:(lines first colorizeAllWith:Color red)
with:(processNameOrNil ? '')
with:(pidOrNil ? '')
@@ -7532,6 +7537,38 @@
stackInspector showLast
!
+updateContextInfoFor:aContext
+ "additional info as-per selected context;
+ for now:
+ update:with:from: - show who was responsible
+ "
+
+ |changedObject receiver|
+
+ aContext selector == #'update:with:from:' ifTrue:[
+ receiver := aContext receiver.
+ changedObject := aContext argAt:3.
+ receiver class allInstanceVariableNames keysAndValuesDo:[:i :nm |
+ (receiver instVarAt:i) == changedObject ifTrue:[
+ contextInfoLabel label:('update (',(aContext argAt:1) printString allBold,') triggered by ',nm allBold).
+ ^ self
+ ]
+ ].
+
+ (receiver isKindOf:ApplicationModel) ifTrue:[
+ receiver builder notNil ifTrue:[
+ (receiver builder bindings ? #()) keysAndValuesDo:[:eachAspect :eachValue |
+ eachValue == changedObject ifTrue:[
+ contextInfoLabel label:('update (',(aContext argAt:1) printString allBold,') triggered by aspect ',eachAspect allBold).
+ ^ self
+ ]
+ ]
+ ]
+ ].
+ ].
+ contextInfoLabel label:nil.
+!
+
updateForContext:lineNr
"show selected code for lineNr in contextList in textView.
Also used to autoselect an interesting context on entry."
@@ -7931,6 +7968,7 @@
] ifTrue:[
sendButton enable.
].
+ self updateContextInfoFor:con.
"clear out locals to prevent keeping around unneeded contexts
(due to the block held in codeView).
@@ -7953,9 +7991,7 @@
defineButton beInvisible.
].
- "
- enable/disable some menu items
- "
+ "/ enable/disable some menu items
self updateMenuItems
"Created: / 14-08-1997 / 20:15:00 / cg"
@@ -8213,11 +8249,11 @@
!DebugView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.572 2013-03-06 09:06:59 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.573 2013-03-26 14:19:53 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.572 2013-03-06 09:06:59 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.573 2013-03-26 14:19:53 cg Exp $'
!
version_SVN