--- a/DebugView.st Mon Dec 03 17:41:23 2001 +0100
+++ b/DebugView.st Tue Dec 04 10:38:47 2001 +0100
@@ -2227,101 +2227,7 @@
initializeMiddleButtonMenu
<resource: #programMenu >
- |items m|
-
- exclusive ifTrue:[
- items := #(
- ('Show longer Walkback' showMore )
- ('Show Verbose Walkback' showVerboseWalkback )
- ('-' )
- ('Remove breakpoint' removeBreakpoint )
- ('Remove all trace & breakpoints' removeAllBreakpoints )
- ('-' )
- ('Copy walkback text' copyWalkbackText )
- ('-' )
- ('QuickTerminate' quickTerminate )
- ('=' )
- ('Exit smalltalk (no confirmation)' exit )
- ).
- ] ifFalse:[
- items := #(
- ('Show longer Walkback' showMore )
- ('Show Verbose Walkback' showVerboseWalkback )
- ('-' )
- ('Skip' skip )
- ('Step out' skipForReturn )
- ('Skip until entering...' skipUntilEntering )
- ('-' )
-"
- ('Continue' doContinue )
- ('Terminate' doTerminate )
- ('Abort' doAbort )
- ('-' )
- ('Step' doStep )
- ('Send' doSend )
- ('-' )
- ('Return' doReturn )
- ('Restart' doRestart )
- ('-' )
-"
- ('Remove breakpoint' removeBreakpoint )
- ('Remove all trace & breakpoints' removeAllBreakpoints )
- ).
-
- ignoreBreakpoints == true ifTrue:[
- items := items , #(
- ('Allow breakpoints in doIts' doNotIgnoreBreakpoints )
- ).
- ] ifFalse:[
- items := items , #(
- ('Ignore breakpoints in doIts' doIgnoreBreakpoints )
- ).
- ].
-
- items := items , #(
- ('-' )
- ('Browse (implementing class)' browseImplementingClass )
- ('Browse (receivers class)' browseReceiversClass )
- ('Browse class hierarchy' browseClassHierarchy )
- ('Browse full class protocol' browseFullClassProtocol )
- ('Implementors' browseImplementors )
- ('Implementors of...' browseImplementorsOf )
- ('Senders' browseSenders )
- ('Senders of...' browseSendersOf )
- ('-' )
- ('Inspect context' inspectContext )
- ('Copy walkback text' copyWalkbackText )
- ('-' )
- ('QuickTerminate' quickTerminate )
- ('=' )
- ('Exit smalltalk (no confirmation)' exit )
- ).
- ].
-
-
- m := PopUpMenu
- itemList:items
- resources:resources
- receiver:self
- for:contextView.
-
- verboseBacktrace ifTrue:[
- m labelAt:#showVerboseWalkback put:(resources string:'Show Dense Walkback').
- m selectorAt:#showVerboseWalkback put:#showDenseWalkback
- ].
-
- contextView middleButtonMenu:m.
-
- inspecting ifTrue:[
- m notNil ifTrue:[
- m disableAll:#(doTraceStep removeBreakpoint browseImplementingClass browseReceiversClass
- browseClassHierarchy browseFullClassProtocol
- browseImplementors browseSenders inspectContext skip doStepOut).
- ].
- ].
- self updateMenuItems
-
- "Modified: / 17.11.2001 / 20:11:14 / cg"
+ contextView middleButtonMenu:(self middleButtonMenu).
!
initializeNextButtonIn:bpanel
@@ -2396,6 +2302,106 @@
"Created: / 17.11.2001 / 21:02:20 / cg"
!
+middleButtonMenu
+ <resource: #programMenu >
+
+ |items m|
+
+ exclusive ifTrue:[
+ items := #(
+ ('Show longer Walkback' showMore )
+ ('Show Verbose Walkback' showVerboseWalkback )
+ ('-' )
+ ('Add breakpoint' addBreakpoint )
+ ('Remove breakpoint' removeBreakpoint )
+ ('Remove all trace & breakpoints' removeAllBreakpoints )
+ ('-' )
+ ('Copy walkback text' copyWalkbackText )
+ ('-' )
+ ('QuickTerminate' quickTerminate )
+ ('=' )
+ ('Exit smalltalk (no confirmation)' exit )
+ ).
+ ] ifFalse:[
+ items := #(
+ ('Show longer Walkback' showMore )
+ ('Show Verbose Walkback' showVerboseWalkback )
+ ('-' )
+ ('Skip' skip )
+ ('Step out' skipForReturn )
+ ('Skip until entering...' skipUntilEntering )
+ ('-' )
+"
+ ('Continue' doContinue )
+ ('Terminate' doTerminate )
+ ('Abort' doAbort )
+ ('-' )
+ ('Step' doStep )
+ ('Send' doSend )
+ ('-' )
+ ('Return' doReturn )
+ ('Restart' doRestart )
+ ('-' )
+"
+ ('Add breakpoint' addBreakpoint )
+ ('Remove breakpoint' removeBreakpoint )
+ ('Remove all trace & breakpoints' removeAllBreakpoints )
+ ).
+
+ ignoreBreakpoints == true ifTrue:[
+ items := items , #(
+ ('Allow breakpoints in doIts' doNotIgnoreBreakpoints )
+ ).
+ ] ifFalse:[
+ items := items , #(
+ ('Ignore breakpoints in doIts' doIgnoreBreakpoints )
+ ).
+ ].
+
+ items := items , #(
+ ('-' )
+ ('Browse (implementing class)' browseImplementingClass )
+ ('Browse (receivers class)' browseReceiversClass )
+ ('Browse class hierarchy' browseClassHierarchy )
+ ('Browse full class protocol' browseFullClassProtocol )
+ ('Implementors' browseImplementors )
+ ('Implementors of...' browseImplementorsOf )
+ ('Senders' browseSenders )
+ ('Senders of...' browseSendersOf )
+ ('-' )
+ ('Inspect context' inspectContext )
+ ('Copy walkback text' copyWalkbackText )
+ ('-' )
+ ('QuickTerminate' quickTerminate )
+ ('=' )
+ ('Exit smalltalk (no confirmation)' exit )
+ ).
+ ].
+
+
+ m := PopUpMenu
+ itemList:items
+ resources:resources
+ receiver:self
+ for:contextView.
+
+ verboseBacktrace ifTrue:[
+ m labelAt:#showVerboseWalkback put:(resources string:'Show Dense Walkback').
+ m selectorAt:#showVerboseWalkback put:#showDenseWalkback
+ ].
+
+ inspecting ifTrue:[
+ m notNil ifTrue:[
+ m disableAll:#(doTraceStep removeBreakpoint browseImplementingClass browseReceiversClass
+ browseClassHierarchy browseFullClassProtocol
+ browseImplementors browseSenders inspectContext skip doStepOut).
+ ].
+ ].
+ self updateMenuItems.
+
+ ^ m.
+!
+
postRealize
super postRealize.
@@ -3020,6 +3026,31 @@
!DebugView methodsFor:'menu / button actions'!
+addBreakpoint
+ "add a breakpoint on the selected contexts method - if any"
+
+ |implementorClass method|
+
+ selectedContext isNil ifTrue:[
+ ^ self showError:'** select a context first **'
+ ].
+ (MessageTracer isNil or:[MessageTracer isLoaded not]) ifTrue:[
+ ^ self
+ ].
+
+ implementorClass := selectedContext methodClass.
+ implementorClass notNil ifTrue:[
+ method := implementorClass compiledMethodAt:selectedContext selector.
+ (method notNil and:[method isBreakpointed not]) ifTrue:[
+ method setBreakPoint
+ ]
+ ].
+ contextView middleButtonMenu disable:#setBreakpoint.
+ contextView middleButtonMenu enable:#removeBreakpoint.
+
+ "Modified: / 13.1.1998 / 00:24:47 / cg"
+!
+
autoUpdateOff
"stop the update process"
@@ -3840,6 +3871,7 @@
]
].
contextView middleButtonMenu disable:#removeBreakpoint.
+ contextView middleButtonMenu enable:#setBreakpoint.
"Modified: / 13.1.1998 / 00:24:47 / cg"
!
@@ -5585,6 +5617,6 @@
!DebugView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.303 2001-11-20 23:04:34 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.304 2001-12-04 09:38:47 cg Exp $'
! !
DebugView initialize!