class: DebugView
authorClaus Gittinger <cg@exept.de>
Sat, 26 Jul 2014 09:55:23 +0200
changeset 14680 858e67cc7b81
parent 14679 1f660b64309d
child 14681 7e1e6251f549
class: DebugView added:5 methods comment/format in: #documentation changed: #breakPointMenuSpec #menuForIgnoreBreakpointIfCalledFromAnyOf
DebugView.st
--- a/DebugView.st	Sat Jul 26 03:49:12 2014 +0000
+++ b/DebugView.st	Sat Jul 26 09:55:23 2014 +0200
@@ -90,13 +90,14 @@
 
     (this is different from other Smalltalk debuggers, which control
      the debuggee as a separate process. Consider this an historic
-     leftover - the debugger was one of the first applications written for
-     ST/X.
+     leftover - the debugger was one of the first applications written for ST/X.
+
      The whole setup might be changed, once the required process primitives
      are available, which allow control of another processes execution
      (i.e. single-step, restart & return). The setup will be changed then,
-     to have the debugger control the debuggee (i.e. two processes)
-     however, why should we change it without a particular need...).
+     to have the debugger control the debuggee (i.e. two processes).
+     However, as it works as it is, and is reliable enough, 
+     why should we change it without a particular need...).
 
     Only the 'stopped' debugged process is affected;
     other processes continue to respond to events.
@@ -106,9 +107,12 @@
 
     See additional information in 'doc/misc/debugger.doc'.
 
-    Notice & Warning:
-        the DebugView class caches the last used debugger in a class variable. 
-        It may happen, that a malfunctioning debugger (for example, a halfway destroyed one) 
+    Notice & Warning (attention when changing thingslike menus, window spec etc. here):
+        the DebugView class caches the last used debugger in a class variable,
+        and hides/shows this window without recreating one from scratch. This is done to make
+        the debugger come up faster when single stepping, or hopping from breakpoint to breakpoint.
+
+        It may happen, that a malfunctioning debugger (for example, a halfway created/destroyed one) 
         is kept there. You will notice this, if a debugger comes up without showing any contents. 
         In this case, close (or destroy) the broken debugView, and execute
             Debugger newDebugger
@@ -865,6 +869,24 @@
                   label: 'Until Shift-Key is Pressed'
                   itemValue: ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed
                 )
+               (MenuItem
+                  label: '-'
+                )
+               (MenuItem
+                  enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped
+                  label: 'In Current Process'
+                  itemValue: ignoreAllHaltsForCurrentProcess
+                )
+               (MenuItem
+                  enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped
+                  label: 'For this Receiver Class'
+                  itemValue: ignoreAllHaltsForThisReceiverClass
+                )
+               (MenuItem
+                  enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped
+                  label: 'If Called from Any Of'
+                  submenuChannel: menuForIgnoreAllBreakpointsIfCalledFromAnyOf
+                )
                )
               nil
               nil
@@ -5968,6 +5990,26 @@
     self allowBreakPointsInDebugger:true
 !
 
+ignoreAllHaltsForCurrentProcess
+    self 
+        addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false 
+        orThisReceiverClass:false orCurrentProcess:true 
+        orIfCalledFromMethod:nil
+        forAll:true.
+
+    "Created: / 27-01-2012 / 11:32:14 / cg"
+!
+
+ignoreAllHaltsForThisReceiverClass
+    self 
+        addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false 
+        orThisReceiverClass:true orCurrentProcess:false 
+        orIfCalledFromMethod:nil
+        forAll:true.
+
+    "Created: / 27-01-2012 / 11:32:14 / cg"
+!
+
 ignoreAllHaltsForever
     self 
         addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false 
@@ -5978,6 +6020,14 @@
     "Created: / 08-05-2011 / 10:19:56 / cg"
 !
 
+ignoreAllHaltsIfCalledFromMethod:aMethod
+    self 
+        addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false 
+        orThisReceiverClass:false orCurrentProcess:false 
+        orIfCalledFromMethod:aMethod
+        forAll:true.
+!
+
 ignoreAllHaltsUntilShiftKeyIsPressed
     self 
         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true 
@@ -6053,9 +6103,21 @@
     "Created: / 27-01-2012 / 11:36:54 / cg"
 !
 
+menuForIgnoreAllBreakpointsIfCalledFromAnyOf
+    <resource: #programMenu >
+
+    ^ self menuForIgnoreBreakpointIfCalledFromAnyOfForAll:true
+!
+
 menuForIgnoreBreakpointIfCalledFromAnyOf
     <resource: #programMenu >
 
+    ^ self menuForIgnoreBreakpointIfCalledFromAnyOfForAll:false
+!
+
+menuForIgnoreBreakpointIfCalledFromAnyOfForAll:forAllHaltsBoolean
+    <resource: #programMenu >
+
     |m count already|
 
     m := Menu new.
@@ -6072,7 +6134,10 @@
                     already add:mthd.
                     m addItem:(MenuItem 
                                 label: (mthd whoString)
-                                itemValue: [ self ignoreHaltIfCalledFromMethod:mthd ]
+                                itemValue: [ forAllHaltsBoolean
+                                                ifTrue:[self ignoreHaltIfCalledFromMethod:mthd]
+                                                ifFalse:[self ignoreAllHaltsIfCalledFromMethod:mthd]
+                                           ]
                                 translateLabel: false).
                     count := count + 1.
                     (count > 20) ifTrue:[
@@ -9361,15 +9426,15 @@
 !DebugView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.663 2014-07-24 18:24:04 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.664 2014-07-26 07:55:23 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.663 2014-07-24 18:24:04 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.664 2014-07-26 07:55:23 cg Exp $'
 !
 
 version_SVN
-    ^ '$Id: DebugView.st,v 1.663 2014-07-24 18:24:04 vrany Exp $'
+    ^ '$Id: DebugView.st,v 1.664 2014-07-26 07:55:23 cg Exp $'
 ! !