DebugView.st
changeset 11366 d57e42f65841
parent 11364 af95026ebbda
child 11367 bd0402b6421a
--- a/DebugView.st	Tue Mar 06 12:11:50 2012 +0100
+++ b/DebugView.st	Tue Mar 06 12:57:30 2012 +0100
@@ -27,7 +27,8 @@
 		lastSelectionInReceiverInspector lastSelectionInContextInspector
 		canShowMore exitAbort reportButton setOfHiddenCallingSelectors
 		isStoppedAtHaltOrBreakPoint exceptionInfoLabel methodCodeToggle
-		methodCodeToggleSelectionHolder'
+		methodCodeToggleSelectionHolder
+		isStoppedAtBreakPointWithParameter breakPointParameter'
 	classVariableNames:'CachedDebugger CachedExclusive OpenDebuggers MoreDebuggingDetail
 		DebuggingDebugger DefaultDebuggerBackgroundColor
 		InitialNChainShown IgnoredHalts ShowThreadID LastIgnoreHaltNTimes
@@ -36,9 +37,22 @@
 	category:'Interface-Debugger'
 !
 
-Object subclass:#IgnoredHalt
-	instanceVariableNames:'weakMethodHolder lineNumber ignoreEndTime ignoreCount
-		ignoreUntilShiftKeyPressed'
+Object subclass:#IgnoredHaltOrBreakpoint
+	instanceVariableNames:'ignoreEndTime ignoreCount ignoreUntilShiftKeyPressed'
+	classVariableNames:''
+	poolDictionaries:''
+	privateIn:DebugView
+!
+
+DebugView::IgnoredHaltOrBreakpoint subclass:#IgnoredHalt
+	instanceVariableNames:'weakMethodHolder lineNumber'
+	classVariableNames:''
+	poolDictionaries:''
+	privateIn:DebugView
+!
+
+DebugView::IgnoredHaltOrBreakpoint subclass:#IgnoredBreakpoint
+	instanceVariableNames:'parameter'
 	classVariableNames:''
 	poolDictionaries:''
 	privateIn:DebugView
@@ -220,6 +234,45 @@
     ^ IgnoredHalts notEmptyOrNil
 !
 
+ignoreBreakpointWithParameter:parameterOrNil forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
+    "remember to ignore a breakpoint with a parameter (i.e. breakpoint:#cg) for some number of invocations
+     or until some time has elapsed.
+     With nil count and time arguments, such an ignored breakpoint is reactivated"
+
+    |oldEntry ign|
+
+    IgnoredHalts notNil ifTrue:[
+        self removeInactiveIgnores.
+        oldEntry := IgnoredHalts
+                        detect:[:ign | ign isForBreakpointWithParameter:parameterOrNil]
+                        ifNone:nil.
+        oldEntry notNil ifTrue:[
+            IgnoredHalts remove:oldEntry ifAbsent:[].
+        ]
+    ].
+
+    (countOrNil notNil or:[dTOrNil notNil or:[untilShiftKey == true]]) ifTrue:[
+        IgnoredHalts isNil ifTrue:[
+            IgnoredHalts := OrderedCollection new.
+        ].
+        ign := IgnoredHalt new breakpointWithParameter:parameterOrNil.
+
+        (countOrNil notNil and:[countOrNil > 0]) ifTrue:[
+            ign ignoreCount:countOrNil.
+        ].
+        (dTOrNil notNil) ifTrue:[
+            ign ignoreEndTime:(Timestamp now + dTOrNil).
+        ].
+        untilShiftKey == true ifTrue:[
+            ign ignoreUntilShiftKeyPressed:true.
+        ].
+        IgnoredHalts add:ign.
+    ].
+    Smalltalk changed:#ignoredHalts.
+
+    "Created: / 06-03-2012 / 12:37:58 / cg"
+!
+
 ignoreHaltIn:haltingMethod at:lineNrOfHalt forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
     "remember to ignore a halt in some method for some number of invocations
      or until some time has elapsed.
@@ -259,8 +312,37 @@
     "Created: / 27-01-2012 / 11:33:38 / cg"
 !
 
+isBreakpointToBeIgnoredForParameter:parameter modifyEntryCount:modifyCount
+    "/ should a breakpoint be ignored ?
+
+    IgnoredHalts isNil ifTrue:[^ false].
+
+    "/ Transcript showCR:'halt/break in ',haltingMethod printString,' at ',lineNrInHaltingMethod printString.
+    IgnoredHalts do:[:ign |
+        (ign isForBreakpointWithParameter and:[ign parameter = parameter]) ifTrue:[
+            Transcript show:'Debugger [info]: break ignored for ', parameter.
+
+            modifyCount ifTrue:[ ign decrementIgnoreCount ].
+            ign isHaltIgnored ifFalse:[
+                Transcript showCR:'Debugger [info]: no longer ignore breakpoint for ', parameter.
+                IgnoredHalts remove:ign ifAbsent:[].
+            ].
+            ^ true.
+        ].
+    ].
+
+    IgnoredHalts := IgnoredHalts reject:[:ign | ign isActive not ].
+    IgnoredHalts isEmpty ifTrue:[
+        IgnoredHalts := nil.
+    ].
+
+    ^ false.
+
+    "Created: / 06-03-2012 / 12:50:30 / cg"
+!
+
 isHaltToBeIgnored
-    |c sender haltingMethod lineNrInHaltingMethod|
+    |c sender haltingMethod lineNrInHaltingMethod breakpointParameter|
 
     "/ should a halt be ignored ?
     IgnoredHalts isNil ifTrue:[^ false].
@@ -293,6 +375,10 @@
             c isNil ifTrue:[
                ^ false
             ].
+            breakpointParameter := c argAt:1.
+            (self isBreakpointToBeIgnoredForParameter:breakpointParameter modifyEntryCount:true) ifTrue:[
+                ^ true.
+            ].
         ].
     ].
 
@@ -316,7 +402,7 @@
         modifyEntryCount:true.
 
     "Created: / 22-10-2010 / 12:09:53 / cg"
-    "Modified: / 27-01-2012 / 11:08:32 / cg"
+    "Modified: / 06-03-2012 / 12:54:09 / cg"
 !
 
 isHaltToBeIgnoredIn:haltingMethod atLineNr:lineNrInHaltingMethod
@@ -327,7 +413,7 @@
 !
 
 isHaltToBeIgnoredIn:haltingMethod atLineNr:lineNrInHaltingMethod modifyEntryCount:modifyCount
-    "/ should a halt be ignored ?
+    "should a halt be ignored ?"
 
     IgnoredHalts isNil ifTrue:[^ false].
 
@@ -346,17 +432,14 @@
         ].
     ].
 
-    IgnoredHalts := IgnoredHalts
-        select:[:ign |
-            ign isActive and:[ (ign isForMethod:haltingMethod line:lineNrInHaltingMethod) not ]
-        ].
+    IgnoredHalts := IgnoredHalts reject:[:ign | ign isActive not].
     IgnoredHalts isEmpty ifTrue:[
         IgnoredHalts := nil.
     ].
 
     ^ false.
 
-    "Modified: / 06-03-2012 / 11:15:01 / cg"
+    "Modified (comment): / 06-03-2012 / 12:51:43 / cg"
 !
 
 removeInactiveIgnores
@@ -632,6 +715,7 @@
     "Do not manually edit this!! If it is corrupted,
      the MenuEditor may not be able to read the specification."
 
+
     "
      MenuEditor new openOnClass:DebugView andSelector:#menuSpec
      (Menu new fromLiteralArrayEncoding:(DebugView menuSpec)) startUp
@@ -639,13 +723,13 @@
 
     <resource: #menu>
 
-    ^
+    ^ 
      #(Menu
         (
          (MenuItem
             label: 'File'
             translateLabel: true
-            submenu:
+            submenu: 
            (Menu
               (
                (MenuItem
@@ -677,7 +761,7 @@
          (MenuItem
             label: 'View'
             translateLabel: true
-            submenu:
+            submenu: 
            (Menu
               (
                (MenuItem
@@ -723,7 +807,7 @@
          (MenuItem
             label: 'Process'
             translateLabel: true
-            submenu:
+            submenu: 
            (Menu
               (
                (MenuItem
@@ -771,7 +855,7 @@
          (MenuItem
             label: 'Context'
             translateLabel: true
-            submenu:
+            submenu: 
            (Menu
               (
                (MenuItem
@@ -813,7 +897,7 @@
          (MenuItem
             label: 'Class'
             translateLabel: true
-            submenu:
+            submenu: 
            (Menu
               (
                (MenuItem
@@ -860,7 +944,7 @@
          (MenuItem
             label: 'Selector'
             translateLabel: true
-            submenu:
+            submenu: 
            (Menu
               (
                (MenuItem
@@ -890,7 +974,7 @@
          (MenuItem
             label: 'Breakpoint'
             translateLabel: true
-            submenu:
+            submenu: 
            (Menu
               (
                (MenuItem
@@ -919,7 +1003,7 @@
                (MenuItem
                   label: 'Ignore this Halt/BreakPoint'
                   translateLabel: true
-                  submenu:
+                  submenu: 
                  (Menu
                     (
                      (MenuItem
@@ -935,6 +1019,7 @@
                         translateLabel: true
                       )
                      (MenuItem
+                        enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped
                         label: 'Until Shift-Key is Pressed'
                         itemValue: ignoreHaltUntilShiftKeyIsPressed
                         translateLabel: true
@@ -951,9 +1036,45 @@
                   )
                 )
                (MenuItem
+                  enabled: isStoppedAtBreakPointWithParameter
+                  label: 'Ignore all BreakPoints with this Parameter'
+                  translateLabel: true
+                  submenu: 
+                 (Menu
+                    (
+                     (MenuItem
+                        enabled: isStoppedAtBreakPointWithParameter
+                        label: 'For Some Time...'
+                        itemValue: openIgnoreBreakpointsWithThisParameterUntilTimeElapsedDialog
+                        translateLabel: true
+                      )
+                     (MenuItem
+                        enabled: isStoppedAtBreakPointWithParameter
+                        label: 'For the Next N Times...'
+                        itemValue: openIgnoreBreakpointsWithThisParameterNTimesDialog
+                        translateLabel: true
+                      )
+                     (MenuItem
+                        enabled: isStoppedAtBreakPointWithParameter
+                        label: 'Until Shift-Key is Pressed'
+                        itemValue: ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed
+                        translateLabel: true
+                      )
+                     (MenuItem
+                        enabled: isStoppedAtBreakPointWithParameter
+                        label: 'Forever (Until Ignoring is Stopped)'
+                        itemValue: ignoreBreakpointsWithThisParameterForever
+                        translateLabel: true
+                      )
+                     )
+                    nil
+                    nil
+                  )
+                )
+               (MenuItem
                   label: 'Ignore all Halts/BreakPoints'
                   translateLabel: true
-                  submenu:
+                  submenu: 
                  (Menu
                     (
                      (MenuItem
@@ -1005,7 +1126,7 @@
             label: 'Help'
             translateLabel: true
             startGroup: right
-            submenu:
+            submenu: 
            (Menu
               (
                (MenuItem
@@ -1031,8 +1152,6 @@
         nil
         nil
       )
-
-    "Modified: / 27-01-2012 / 11:29:45 / cg"
 ! !
 
 !DebugView class methodsFor:'misc'!
@@ -3432,31 +3551,6 @@
 
 !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:#addBreakpoint.
-    contextView middleButtonMenu enable:#removeBreakpoint.
-
-    "Modified: / 13.1.1998 / 00:24:47 / cg"
-!
-
 addBrowserBookmark
     "add a browser-bookmark for the selected contexts method"
 
@@ -3472,16 +3566,6 @@
     Tools::NewSystemBrowser addToBookMarks:cls selector:sel
 !
 
-allowBreakPointsInDebugger
-    ^ ignoreBreakpoints not
-!
-
-allowBreakPointsInDebugger:aBoolean
-    ignoreBreakpoints := aBoolean not.
-    self initializeMiddleButtonMenu.
-    self initializeContextViewsMiddleButtonMenu.
-!
-
 autoRaiseView
     ^ UserPreferences current autoRaiseDebugger
 
@@ -3996,10 +4080,6 @@
     "Modified: / 17.11.2001 / 23:43:54 / cg"
 !
 
-doIgnoreBreakpoints
-    self allowBreakPointsInDebugger:false
-!
-
 doMicroSend
     "single send; reenter with next message send"
 
@@ -4066,10 +4146,6 @@
     tracing := false
 !
 
-doNotIgnoreBreakpoints
-    self allowBreakPointsInDebugger:true
-!
-
 doOpenReportMailApp
     "open a mail report tool"
 
@@ -4376,34 +4452,6 @@
     OperatingSystem exit
 !
 
-hasHaltsToIgnore
-    ^ IgnoredHalts notEmptyOrNil
-!
-
-ignoreAllHaltsForever
-    self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:true.
-
-    "Created: / 08-05-2011 / 10:19:56 / cg"
-!
-
-ignoreAllHaltsUntilShiftKeyIsPressed
-    self addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true forAll:true.
-
-    "Created: / 27-01-2012 / 11:32:14 / cg"
-!
-
-ignoreHaltForever
-    self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:false.
-
-    "Modified: / 27-01-2012 / 11:31:37 / cg"
-!
-
-ignoreHaltUntilShiftKeyIsPressed
-    self addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true forAll:false.
-
-    "Created: / 27-01-2012 / 11:36:54 / cg"
-!
-
 inspectContext
     "launch an inspector on the currently selected context"
 
@@ -4414,14 +4462,6 @@
     ]
 !
 
-isStoppedAtHaltOrBreakPoint
-    ^ isStoppedAtHaltOrBreakPoint
-!
-
-isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped
-    ^ isStoppedAtHaltOrBreakPoint or:[self selectedContextIsWrapped]
-!
-
 middleButtonMenu
     <resource: #programMenu >
 
@@ -4533,72 +4573,6 @@
     "Modified: / 12-09-2006 / 17:20:38 / cg"
 !
 
-openBreakPointBrowser
-    Tools::BreakpointBrowser open
-
-    "Created: / 27-10-2010 / 12:52:49 / cg"
-!
-
-openIgnoreAllHaltsUntilTimeElapsedDialog
-    |answer dT|
-
-    [
-        answer := Dialog
-                    request:(resources string:'How long should all halts/breakpoints be ignored [smh] ?')
-                    initialAnswer:(LastIgnoreHaltDuration ? '30s') printString.
-        answer isEmptyOrNil ifTrue:[^ self].
-
-        dT := TimeDuration readFrom:answer onError:[ nil ].
-        dT notNil ifTrue:[
-            LastIgnoreHaltDuration := dT.
-            self addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false forAll:true.
-            ^ self.
-        ].
-    ] loop
-
-    "Created: / 08-05-2011 / 10:19:20 / cg"
-!
-
-openIgnoreHaltNTimesDialog
-    |answer n|
-
-    [
-        answer := Dialog
-                    request:(resources string:'How often should this halt be ignored ?')
-                    initialAnswer:(LastIgnoreHaltNTimes ? '') printString.
-        answer isEmptyOrNil ifTrue:[^ self].
-
-        n := Integer readFrom:answer onError:nil.
-        n notNil ifTrue:[
-            LastIgnoreHaltNTimes := n.
-            self addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false forAll:false.
-            ^ self.
-        ].
-    ] loop.
-
-    "Modified: / 27-01-2012 / 11:31:44 / cg"
-!
-
-openIgnoreHaltUntilTimeElapsedDialog
-    |answer dT|
-
-    [
-        answer := Dialog
-                    request:(resources string:'How long should this halt/breakpoint be ignored (s/m/h) ?')
-                    initialAnswer:(LastIgnoreHaltDuration ? '30s') printString.
-        answer isEmptyOrNil ifTrue:[^ self].
-
-        dT := TimeDuration readFrom:answer onError:[ nil ].
-        dT notNil ifTrue:[
-            LastIgnoreHaltDuration := dT.
-            self addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false forAll:false.
-            ^ self.
-        ].
-    ] loop
-
-    "Modified: / 27-01-2012 / 11:31:47 / cg"
-!
-
 openSettingsDialog
     |settingsList settingsApp|
 
@@ -4646,56 +4620,6 @@
     "Modified: 10.1.1997 / 17:42:10 / cg"
 !
 
-removeAllBreakpoints
-    "remove all trace & breakpoints - if any"
-
-    (MessageTracer notNil and:[MessageTracer isLoaded]) ifTrue:[
-        self withExecuteCursorDo:[
-            MessageTracer unwrapAllMethods
-        ]
-    ]
-
-    "Modified: / 21.5.1998 / 01:44:43 / cg"
-!
-
-removeBreakpoint
-    "remove 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]) ifTrue:[
-            method clearBreakPoint
-        ]
-    ].
-    contextView middleButtonMenu disable:#removeBreakpoint.
-    contextView middleButtonMenu enable:#addBreakpoint.
-
-    "Modified: / 13.1.1998 / 00:24:47 / cg"
-!
-
-selectedContextIsWrapped
-    |con mthd|
-
-    contextView selection notNil ifTrue:[
-        (contextView selectionValue startsWith:'**') ifFalse:[
-            con := contextArray at:(contextView selection).
-            mthd := con methodHome method.
-            ^ mthd notNil and:[mthd isWrapped]
-        ]
-    ].
-    ^ false.
-!
-
 showDenseWalkback
     |m|
 
@@ -4788,10 +4712,6 @@
     "Modified: 3.3.1997 / 20:56:32 / cg"
 !
 
-stopIgnoringHalts
-    self class stopIgnoringHalts
-!
-
 toggleVerboseWalkback
     verboseBacktrace ifFalse:[
         self showVerboseWalkback
@@ -4802,6 +4722,240 @@
     "Modified: / 17.11.2001 / 20:07:45 / cg"
 ! !
 
+!DebugView methodsFor:'menu & button actions-breakpoints'!
+
+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:#addBreakpoint.
+    contextView middleButtonMenu enable:#removeBreakpoint.
+
+    "Modified: / 13.1.1998 / 00:24:47 / cg"
+!
+
+allowBreakPointsInDebugger
+    ^ ignoreBreakpoints not
+!
+
+allowBreakPointsInDebugger:aBoolean
+    ignoreBreakpoints := aBoolean not.
+    self initializeMiddleButtonMenu.
+    self initializeContextViewsMiddleButtonMenu.
+!
+
+doIgnoreBreakpoints
+    self allowBreakPointsInDebugger:false
+!
+
+doNotIgnoreBreakpoints
+    self allowBreakPointsInDebugger:true
+!
+
+ignoreAllHaltsForever
+    self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:true.
+
+    "Created: / 08-05-2011 / 10:19:56 / cg"
+!
+
+ignoreAllHaltsUntilShiftKeyIsPressed
+    self addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true forAll:true.
+
+    "Created: / 27-01-2012 / 11:32:14 / cg"
+!
+
+ignoreBreakpointsWithThisParameterForever
+    self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:false.
+
+    "Modified: / 27-01-2012 / 11:31:37 / cg"
+    "Created: / 06-03-2012 / 12:35:48 / cg"
+!
+
+ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed
+    self addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true forAll:false.
+
+    "Created: / 06-03-2012 / 12:35:22 / cg"
+!
+
+ignoreHaltForever
+    self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:false.
+
+    "Modified: / 27-01-2012 / 11:31:37 / cg"
+!
+
+ignoreHaltUntilShiftKeyIsPressed
+    self addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true forAll:false.
+
+    "Created: / 27-01-2012 / 11:36:54 / cg"
+!
+
+openBreakPointBrowser
+    Tools::BreakpointBrowser open
+
+    "Created: / 27-10-2010 / 12:52:49 / cg"
+!
+
+openIgnoreAllHaltsUntilTimeElapsedDialog
+    |answer dT|
+
+    [
+        answer := Dialog
+                    request:(resources string:'How long should all halts/breakpoints be ignored [smh] ?')
+                    initialAnswer:(LastIgnoreHaltDuration ? '30s') printString.
+        answer isEmptyOrNil ifTrue:[^ self].
+
+        dT := TimeDuration readFrom:answer onError:[ nil ].
+        dT notNil ifTrue:[
+            LastIgnoreHaltDuration := dT.
+            self addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false forAll:true.
+            ^ self.
+        ].
+    ] loop
+
+    "Created: / 08-05-2011 / 10:19:20 / cg"
+!
+
+openIgnoreBreakpointsWithThisParameterNTimesDialog
+    |answer n|
+
+    [
+        answer := Dialog
+                    request:(resources 
+                                string:'How often should breakpoints with parameter "%1" be ignored ?'
+                                with:breakPointParameter)
+                    initialAnswer:(LastIgnoreHaltNTimes ? '') printString.
+        answer isEmptyOrNil ifTrue:[^ self].
+
+        n := Integer readFrom:answer onError:nil.
+        n notNil ifTrue:[
+            LastIgnoreHaltNTimes := n.
+            self addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false forAll:false.
+            ^ self.
+        ].
+    ] loop.
+
+    "Modified: / 27-01-2012 / 11:31:44 / cg"
+    "Created: / 06-03-2012 / 12:28:51 / cg"
+!
+
+openIgnoreBreakpointsWithThisParameterUntilTimeElapsedDialog
+    |answer dT|
+
+    [
+        answer := Dialog
+                    request:(resources 
+                                string:'How long should breakpoints with parameter "%1" be ignored (s/m/h) ?'
+                                with:breakPointParameter)
+                    initialAnswer:(LastIgnoreHaltDuration ? '30s') printString.
+        answer isEmptyOrNil ifTrue:[^ self].
+
+        dT := TimeDuration readFrom:answer onError:[ nil ].
+        dT notNil ifTrue:[
+            LastIgnoreHaltDuration := dT.
+            self addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false forAll:false.
+            ^ self.
+        ].
+    ] loop
+
+    "Created: / 06-03-2012 / 12:03:36 / cg"
+!
+
+openIgnoreHaltNTimesDialog
+    |answer n|
+
+    [
+        answer := Dialog
+                    request:(resources string:'How often should this halt be ignored ?')
+                    initialAnswer:(LastIgnoreHaltNTimes ? '') printString.
+        answer isEmptyOrNil ifTrue:[^ self].
+
+        n := Integer readFrom:answer onError:nil.
+        n notNil ifTrue:[
+            LastIgnoreHaltNTimes := n.
+            self addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false forAll:false.
+            ^ self.
+        ].
+    ] loop.
+
+    "Modified: / 27-01-2012 / 11:31:44 / cg"
+!
+
+openIgnoreHaltUntilTimeElapsedDialog
+    |answer dT|
+
+    [
+        answer := Dialog
+                    request:(resources string:'How long should this halt/breakpoint be ignored (s/m/h) ?')
+                    initialAnswer:(LastIgnoreHaltDuration ? '30s') printString.
+        answer isEmptyOrNil ifTrue:[^ self].
+
+        dT := TimeDuration readFrom:answer onError:[ nil ].
+        dT notNil ifTrue:[
+            LastIgnoreHaltDuration := dT.
+            self addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false forAll:false.
+            ^ self.
+        ].
+    ] loop
+
+    "Modified: / 27-01-2012 / 11:31:47 / cg"
+!
+
+removeAllBreakpoints
+    "remove all trace & breakpoints - if any"
+
+    (MessageTracer notNil and:[MessageTracer isLoaded]) ifTrue:[
+        self withExecuteCursorDo:[
+            MessageTracer unwrapAllMethods
+        ]
+    ]
+
+    "Modified: / 21.5.1998 / 01:44:43 / cg"
+!
+
+removeBreakpoint
+    "remove 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]) ifTrue:[
+            method clearBreakPoint
+        ]
+    ].
+    contextView middleButtonMenu disable:#removeBreakpoint.
+    contextView middleButtonMenu enable:#addBreakpoint.
+
+    "Modified: / 13.1.1998 / 00:24:47 / cg"
+!
+
+stopIgnoringHalts
+    self class stopIgnoringHalts
+! !
+
 !DebugView methodsFor:'private'!
 
 abortAllIsHandled
@@ -4814,68 +4968,6 @@
     ^ busy
 !
 
-canBrowseClassHierarchy
-    |m|
-
-    m := contextView middleButtonMenu.
-    ^ m notNil and:[m isEnabled:#browseClassHierarchy]
-!
-
-canBrowseFullClassProtocol
-    |m|
-
-    m := contextView middleButtonMenu.
-    ^ m notNil and:[m isEnabled:#browseFullClassProtocol]
-!
-
-canBrowseImplementingClass
-    |m|
-
-    m := contextView middleButtonMenu.
-    ^ m notNil and:[m isEnabled:#browseImplementingClass]
-!
-
-canBrowseProcessesApplication
-    |p|
-
-    p := inspectedProcess ? Processor activeProcess.
-    p isNil ifTrue:[^ false].
-    ^ p isGUIProcess
-!
-
-canBrowseReceiversClass
-    |m|
-
-    m := contextView middleButtonMenu.
-    ^ m notNil and:[m isEnabled:#browseReceiversClass]
-!
-
-canDefineMethod
-    ^ defineButton isVisible
-!
-
-canRestart
-    ^ restartButton isEnabled
-
-    "Modified: / 17.11.2001 / 19:59:49 / cg"
-!
-
-canReturn
-    ^ returnButton isEnabled
-
-    "Modified: / 17.11.2001 / 19:59:18 / cg"
-!
-
-canSendEmail
-    ^ SendMailTool notNil
-
-    "Created: / 15-10-2010 / 11:51:23 / cg"
-!
-
-canShowMore
-    ^ canShowMore
-!
-
 contextListEntryFor:aContext
     |s|
 
@@ -4968,12 +5060,6 @@
     "Modified (format): / 27-01-2012 / 11:10:00 / cg"
 !
 
-hasContextSelected
-    ^ contextView hasSelection
-
-    "Created: / 17.11.2001 / 19:57:03 / cg"
-!
-
 inspectedProcess
     ^ inspectedProcess
 !
@@ -5388,10 +5474,109 @@
 
 !DebugView methodsFor:'private queries'!
 
+canBrowseClassHierarchy
+    |m|
+
+    m := contextView middleButtonMenu.
+    ^ m notNil and:[m isEnabled:#browseClassHierarchy]
+!
+
+canBrowseFullClassProtocol
+    |m|
+
+    m := contextView middleButtonMenu.
+    ^ m notNil and:[m isEnabled:#browseFullClassProtocol]
+!
+
+canBrowseImplementingClass
+    |m|
+
+    m := contextView middleButtonMenu.
+    ^ m notNil and:[m isEnabled:#browseImplementingClass]
+!
+
+canBrowseProcessesApplication
+    |p|
+
+    p := inspectedProcess ? Processor activeProcess.
+    p isNil ifTrue:[^ false].
+    ^ p isGUIProcess
+!
+
+canBrowseReceiversClass
+    |m|
+
+    m := contextView middleButtonMenu.
+    ^ m notNil and:[m isEnabled:#browseReceiversClass]
+!
+
+canDefineMethod
+    ^ defineButton isVisible
+!
+
+canRestart
+    ^ restartButton isEnabled
+
+    "Modified: / 17.11.2001 / 19:59:49 / cg"
+!
+
+canReturn
+    ^ returnButton isEnabled
+
+    "Modified: / 17.11.2001 / 19:59:18 / cg"
+!
+
+canSendEmail
+    ^ SendMailTool notNil
+
+    "Created: / 15-10-2010 / 11:51:23 / cg"
+!
+
+canShowMore
+    ^ canShowMore
+!
+
+hasContextSelected
+    ^ contextView hasSelection
+
+    "Created: / 17.11.2001 / 19:57:03 / cg"
+!
+
+hasHaltsToIgnore
+    ^ IgnoredHalts notEmptyOrNil
+!
+
 isAborting
     ^ exitAction == #abort
 !
 
+isStoppedAtBreakPointWithParameter
+    ^ isStoppedAtBreakPointWithParameter
+
+    "Created: / 06-03-2012 / 12:16:56 / cg"
+!
+
+isStoppedAtHaltOrBreakPoint
+    ^ isStoppedAtHaltOrBreakPoint
+!
+
+isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped
+    ^ isStoppedAtHaltOrBreakPoint or:[self selectedContextIsWrapped]
+!
+
+selectedContextIsWrapped
+    |con mthd|
+
+    contextView selection notNil ifTrue:[
+        (contextView selectionValue startsWith:'**') ifFalse:[
+            con := contextArray at:(contextView selection).
+            mthd := con methodHome method.
+            ^ mthd notNil and:[mthd isWrapped]
+        ]
+    ].
+    ^ false.
+!
+
 setOfHiddenCallingSelectors
     ^ setOfHiddenCallingSelectors ? #( #'doIt' #'doIt:' )
 !
@@ -5609,7 +5794,7 @@
         ^ false
     ].
 
-    isStoppedAtHaltOrBreakPoint := false.
+    isStoppedAtHaltOrBreakPoint := isStoppedAtBreakPointWithParameter := false.
     firstContext := aContext.
 
     m := contextView middleButtonMenu.
@@ -5661,6 +5846,10 @@
             (self haltSelectors includes:con selector) ifTrue:[
                 (method := con method) notNil ifTrue:[
                     method mclass == Object ifTrue:[
+                        (con selector startsWith:'breakPoint:') ifTrue:[
+                            isStoppedAtBreakPointWithParameter := true.
+                            breakPointParameter := con argAt:1.
+                        ].
                         isStoppedAtHaltOrBreakPoint := true.
                         verboseBacktrace ~~ true ifTrue:[
                             calledContext := con.
@@ -5686,6 +5875,10 @@
             (self haltSelectors includes:con selector) ifTrue:[
                 (method := con method) notNil ifTrue:[
                     method mclass == Object ifTrue:[
+                        (con selector startsWith:'breakPoint:') ifTrue:[
+                            isStoppedAtBreakPointWithParameter := true.
+                            breakPointParameter := con argAt:1.
+                        ].
                         isStoppedAtHaltOrBreakPoint := true.
                     ] ifFalse:[
                         method mclass == Breakpoint ifTrue:[
@@ -5839,7 +6032,7 @@
     ^ true
 
     "Created: / 14-12-1995 / 19:10:31 / cg"
-    "Modified: / 27-01-2012 / 11:13:21 / cg"
+    "Modified: / 06-03-2012 / 12:23:46 / cg"
 !
 
 setContextSkippingInterruptContexts:aContext
@@ -7125,7 +7318,7 @@
     "Modified: / 05-10-2011 / 11:55:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-!DebugView::IgnoredHalt methodsFor:'accessing'!
+!DebugView::IgnoredHaltOrBreakpoint methodsFor:'accessing'!
 
 ignoreCount:something
     ignoreCount := something.
@@ -7139,7 +7332,115 @@
     ignoreUntilShiftKeyPressed := aBoolean.
 
     "Created: / 27-01-2012 / 11:35:23 / cg"
-!
+! !
+
+!DebugView::IgnoredHaltOrBreakpoint methodsFor:'misc'!
+
+decrementIgnoreCount
+    ignoreCount notNil ifTrue:[
+        ignoreCount > 0 ifTrue:[
+            ignoreCount := ignoreCount - 1
+        ]
+    ]
+! !
+
+!DebugView::IgnoredHaltOrBreakpoint methodsFor:'printing'!
+
+printConditionOn:aStream
+    ignoreUntilShiftKeyPressed == true ifTrue:[
+        aStream nextPutAll:' until shiftKey pressed'.
+    ] ifFalse:[
+        ignoreEndTime notNil ifTrue:[
+            aStream nextPutAll:' until '.
+            ignoreEndTime printOn:aStream.
+        ] ifFalse:[
+            (ignoreCount > 0) ifTrue:[
+                aStream nextPutAll:' for '.
+                ignoreCount printOn:aStream.
+            ] ifFalse:[
+                (ignoreCount < 0) ifTrue:[
+                    aStream nextPutAll:' forEver'.
+                ] ifFalse:[
+                    aStream nextPutAll:' no longer'.
+                ].
+            ].
+        ].
+    ].
+
+    "Modified: / 27-01-2012 / 11:43:10 / cg"
+    "Created: / 06-03-2012 / 12:41:10 / cg"
+! !
+
+!DebugView::IgnoredHaltOrBreakpoint methodsFor:'queries'!
+
+haltIgnoredInfoString
+    "some string describing why and how this halt is ignored;
+     nil if not ignored"
+
+    ignoreCount notNil ifTrue:[
+        ignoreCount > 0 ifTrue:[
+            ^ '%1 more calls ignored' bindWith:ignoreCount
+        ].
+        ^ nil
+    ].
+    ignoreEndTime notNil ifTrue:[
+        (ignoreEndTime > Timestamp now) ifTrue:[
+            ^ 'ignored until %1' bindWith:ignoreEndTime
+        ].
+        ^ nil
+    ].
+    ignoreUntilShiftKeyPressed == true ifTrue:[
+        Display shiftDown ifFalse:[
+            ^ 'ignored until shiftKey is pressed'
+        ].
+        ^ nil
+    ].
+
+    ^ 'ignored until reenabled'
+
+    "Modified: / 27-01-2012 / 11:35:48 / cg"
+!
+
+isActive
+    "true if this ignore-entry is still active"
+
+    ignoreEndTime notNil ifTrue:[
+        ^ ignoreEndTime > Timestamp now
+    ].
+    ignoreCount notNil ifTrue:[
+        ^ ignoreCount > 0
+    ].
+    ^ false
+
+    "Created: / 06-03-2012 / 12:39:46 / cg"
+!
+
+isForBreakpointWithParameter
+    ^ false
+
+    "Modified: / 27-01-2012 / 11:36:01 / cg"
+    "Created: / 06-03-2012 / 12:47:02 / cg"
+!
+
+isHaltIgnored
+    "true if this halt should be ignored"
+
+    ignoreUntilShiftKeyPressed == true ifTrue:[
+        ^ Display shiftDown not
+    ].
+    ignoreCount notNil ifTrue:[
+        ^ ignoreCount > 0
+    ].
+    ignoreEndTime notNil ifTrue:[
+        ^ ignoreEndTime > Timestamp now
+    ].
+
+    ^ true
+
+    "Modified: / 27-01-2012 / 11:36:01 / cg"
+! !
+
+!DebugView::IgnoredHalt methodsFor:'accessing'!
 
 method
     |m|
@@ -7174,16 +7475,6 @@
     "Modified: / 08-05-2011 / 10:28:41 / cg"
 ! !
 
-!DebugView::IgnoredHalt methodsFor:'misc'!
-
-decrementIgnoreCount
-    ignoreCount notNil ifTrue:[
-        ignoreCount > 0 ifTrue:[
-            ignoreCount := ignoreCount - 1
-        ]
-    ]
-! !
-
 !DebugView::IgnoredHalt methodsFor:'printing'!
 
 printOn:aStream
@@ -7196,75 +7487,20 @@
 
     aStream nextPutAll:'Ignore '.
     method whoString printOn:aStream.
-
-    ignoreUntilShiftKeyPressed == true ifTrue:[
-        aStream nextPutAll:' until shiftKey pressed'.
-    ] ifFalse:[
-        ignoreEndTime notNil ifTrue:[
-            aStream nextPutAll:' until '.
-            ignoreEndTime printOn:aStream.
-        ] ifFalse:[
-            (ignoreCount > 0) ifTrue:[
-                aStream nextPutAll:' for '.
-                ignoreCount printOn:aStream.
-            ] ifFalse:[
-                (ignoreCount < 0) ifTrue:[
-                    aStream nextPutAll:' forEver'.
-                ] ifFalse:[
-                    aStream nextPutAll:' no longer'.
-                ].
-            ].
-        ].
-    ].
-
-    "Modified: / 27-01-2012 / 11:43:10 / cg"
+    self printConditionOn:aStream.
+
+    "Modified: / 06-03-2012 / 12:41:19 / cg"
 ! !
 
 !DebugView::IgnoredHalt methodsFor:'queries'!
 
-haltIgnoredInfoString
-    "some string describing why and how this halt is ignored;
-     nil if not ignored"
-
-    ignoreCount notNil ifTrue:[
-        ignoreCount > 0 ifTrue:[
-            ^ '%1 more calls ignored' bindWith:ignoreCount
-        ].
-        ^ nil
-    ].
-    ignoreEndTime notNil ifTrue:[
-        (ignoreEndTime > Timestamp now) ifTrue:[
-            ^ 'ignored until %1' bindWith:ignoreEndTime
-        ].
-        ^ nil
-    ].
-    ignoreUntilShiftKeyPressed == true ifTrue:[
-        Display shiftDown ifFalse:[
-            ^ 'ignored until shiftKey is pressed'
-        ].
-        ^ nil
-    ].
-
-    ^ 'ignored until reenabled'
-
-    "Modified: / 27-01-2012 / 11:35:48 / cg"
-!
-
 isActive
     "true if this ignore-entry is still active"
 
     self method isNil ifTrue:[self halt. ^ false ].    "/ method no longer valid
-
-    ignoreEndTime notNil ifTrue:[
-        ^ ignoreEndTime > Timestamp now
-    ].
-    ignoreCount notNil ifTrue:[
-        ^ ignoreCount > 0
-    ].
-    ^ false
-
-    "Modified: / 23-03-2011 / 15:21:02 / cg"
-    "Modified (format): / 27-01-2012 / 11:25:30 / cg"
+    ^ super isActive
+
+    "Modified: / 06-03-2012 / 12:40:20 / cg"
 !
 
 isForMethod:aMethod line:line
@@ -7276,24 +7512,6 @@
     "Modified: / 08-05-2011 / 10:27:31 / cg"
 !
 
-isHaltIgnored
-    "true if this halt should be ignored"
-
-    ignoreUntilShiftKeyPressed == true ifTrue:[
-        ^ Display shiftDown not
-    ].
-    ignoreCount notNil ifTrue:[
-        ^ ignoreCount > 0
-    ].
-    ignoreEndTime notNil ifTrue:[
-        ^ ignoreEndTime > Timestamp now
-    ].
-
-    ^ true
-
-    "Modified: / 27-01-2012 / 11:36:01 / cg"
-!
-
 isHaltIgnoredInMethod:aMethod line:line
     "/ Transcript show:'?same as ign '; show:(weakMethodHolder at:1); show:' at '; showCR:lineNumber.
 
@@ -7303,14 +7521,41 @@
     ^ self isHaltIgnored
 ! !
 
+!DebugView::IgnoredBreakpoint methodsFor:'accessing'!
+
+parameter
+    ^ parameter
+!
+
+parameter:something
+    parameter := something.
+! !
+
+!DebugView::IgnoredBreakpoint methodsFor:'printing'!
+
+printOn:aStream
+    aStream nextPutAll:'Ignore breakpoint:#', parameter.
+    self printConditionOn:aStream.
+
+    "Created: / 06-03-2012 / 12:42:10 / cg"
+! !
+
+!DebugView::IgnoredBreakpoint methodsFor:'queries'!
+
+isForBreakpointWithParameter
+    ^ true
+
+    "Created: / 06-03-2012 / 12:54:35 / cg"
+! !
+
 !DebugView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.531 2012-03-06 10:24:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.532 2012-03-06 11:57:30 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.531 2012-03-06 10:24:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.532 2012-03-06 11:57:30 cg Exp $'
 !
 
 version_SVN