--- a/DebugView.st Mon May 16 13:29:34 2016 +0200
+++ b/DebugView.st Mon May 16 23:56:06 2016 +0200
@@ -1849,16 +1849,37 @@
model:ignoreForEverHolder).
].
] do:[
- |answer|
-
- answer := Dialog
- confirm:(self resources
+ |answer canRemove labels actions|
+
+ "/ cannot remove halts or coded breakpoints.
+ canRemove := haltingMethod isMethodWithBreakpoints or:[ haltingMethod isBreakpointed ].
+ labels := #('Ignore' 'Remove Breakpoint' 'Debug' ).
+ actions := #(ignore remove debug).
+ canRemove ifFalse:[
+ labels := #('Ignore' 'Debug' ).
+ actions := #(ignore debug).
+ ].
+
+ answer := OptionBox
+ choose:(self resources
stringWithCRs:'%1\%2\\%3'
with:whatError
with:descr
with:where)
- yesLabel:(resources string:'Debug')
- noLabel:(resources string:'Ignore').
+ label:whatError
+ image:nil
+ labels:(resources array:labels)
+ values:actions
+ default:#ignore
+ onCancel:#ignore.
+"/ answer := Dialog
+"/ confirm:(self resources
+"/ stringWithCRs:'%1\%2\\%3'
+"/ with:whatError
+"/ with:descr
+"/ with:where)
+"/ yesLabel:(resources string:'Debug')
+"/ noLabel:(resources string:'Ignore').
(ignoreForSomeTimeHolder value or:[ignoreForEverHolder value]) ifTrue:[
self
@@ -1870,7 +1891,16 @@
orIfCalledFromMethod:nil.
].
- answer ifTrue:[
+ answer == #remove ifTrue:[
+ haltingMethod isMethodWithBreakpoints ifTrue:[
+ haltingMethod disableBreakpointInLine:lineNrOfHalt
+ ] ifFalse:[
+ haltingMethod isBreakpointed ifTrue:[
+ haltingMethod clearBreakPoint
+ ].
+ ].
+ ].
+ answer ~~ #debug ifTrue:[
ex reject.
]
]