# HG changeset patch # User Claus Gittinger # Date 1371801208 -7200 # Node ID 3642a54942f07234749b42c54d6eeac9eddae3c8 # Parent 34c2e89020d5a7ef95ac9570461730d86d223165 class: Tools::BreakpointService changed: #breakpointAtLine: #recompile #setOrToggleBreakpointAtLine: diff -r 34c2e89020d5 -r 3642a54942f0 Tools__BreakpointService.st --- a/Tools__BreakpointService.st Fri Jun 21 09:52:23 2013 +0200 +++ b/Tools__BreakpointService.st Fri Jun 21 09:53:28 2013 +0200 @@ -184,8 +184,10 @@ breakpointAtLine:line |pos| + breakpoints isNil ifTrue:[^ nil]. + pos := textView characterPositionOfLine:line col:1. - ^ breakpoints ? #() detect:[:each | each position = pos ] ifNone:[ nil ] + ^ breakpoints detect:[:each | each position = pos ] ifNone:[ nil ] "Modified: / 17-06-2011 / 13:59:17 / Jan Vrany " "Modified (format): / 05-07-2011 / 21:33:23 / cg" @@ -272,7 +274,17 @@ ^ self ]. ]. - "/ must come indirectly!! + + breakpoints := breakpoints + select:[:bp | +"/ bp isReached ifFalse:[ +"/ "/ Transcript show:'remove unreached:'; showCR:bp +"/ ]. + bp isReached + ]. + + "/ must update breakpoints BEFORE the following, because it leads to a change + "/ notification, which may clear the breakpoints collection!! codeView methodHolder value:newMethod. oldMethod mclass isNil ifTrue:[ "/ although this is not strictly true, not doing this @@ -282,14 +294,6 @@ class changed:#methodTrap with:selector. "/ tell browsers Smalltalk changed:#methodTrap with:(MethodTrapChangeNotificationParameter changeClass:class changeSelector:selector). ]. - - breakpoints := breakpoints - select:[:bp | -"/ bp isReached ifFalse:[ -"/ "/ Transcript show:'remove unreached:'; showCR:bp -"/ ]. - bp isReached - ] ] ] @@ -348,6 +352,7 @@ "/ trace bpnt beTracepoint ]. + self assert: breakpoints notEmptyOrNil. self recompile. ] ifFalse:[ codeView topView class == DebugView ifTrue:[ @@ -463,14 +468,14 @@ !BreakpointService class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointService.st,v 1.23 2013-06-20 23:21:35 cg Exp $' + ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointService.st,v 1.24 2013-06-21 07:53:28 cg Exp $' ! version_CVS - ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointService.st,v 1.23 2013-06-20 23:21:35 cg Exp $' + ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointService.st,v 1.24 2013-06-21 07:53:28 cg Exp $' ! version_SVN - ^ '$Id: Tools__BreakpointService.st,v 1.23 2013-06-20 23:21:35 cg Exp $' + ^ '$Id: Tools__BreakpointService.st,v 1.24 2013-06-21 07:53:28 cg Exp $' ! !