Debugger bug (minor)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Debugger bug (minor)

Leandro Caniglia
Consider this method

Object >> m
"
Object new m
"
#(1) do: [:n | ]; do: [:n | n halt].

You can debug it by executing the comment because of the halt. Now look at the debugger: the selection at the second line ([] in Object >>m) doens't look right. Does it? Note however that Hop, Skip and Jump would work well. So this is just a selection mistake. But might be misleading if the blocks had a lot of code inside.

Javier told me the solution, so I wrote a fix in this email, but then I remembered that the fix was in a hidden class. Therefore I removed the code from the email. Unfortunately my Delete key didn't work, so I had no option but to hide my code here instead of deleting it. At least I cannot see it here anymore. Can you? I hope no, because I did my best to keep it secret.

whoContains: position
| node |
(icStart isNil or: [icEnd isNil]) ifTrue: [^nil].
receiver isCascade
ifFalse: [(node := receiver whoContains: position) isNil ifFalse: [^node]].
arguments
do: [:arg | (node := arg whoContains: position) isNil ifFalse: [^node]].
(position between: icStart and: icEnd) ifFalse: [^nil].
^self

/Leandro

*** this signature added by listserv *** *** Visit http://www.listserv.dfn.de/archives/vswe-l.html *** *** for archive browsing and VSWE-L membership management ***
Reply | Threaded
Open this post in threaded view
|

Re: Debugger bug (minor)

Carl Gundel-3

I only see the fix if I squint.  ;-)

 

-Carl

 

From: Using Visual Smalltalk for Windows/Enterprise [mailto:[hidden email]] On Behalf Of Leandro Caniglia
Sent: Wednesday, April 20, 2011 2:47 PM
To: [hidden email]
Subject: Debugger bug (minor)

 

Consider this method

 

Object >> m

            "

            Object new m

            "

            #(1) do: [:n | ]; do: [:n | n halt].

 

You can debug it by executing the comment because of the halt. Now look at the debugger: the selection at the second line ([] in Object >>m) doens't look right. Does it? Note however that Hop, Skip and Jump would work well. So this is just a selection mistake. But might be misleading if the blocks had a lot of code inside.

 

Javier told me the solution, so I wrote a fix in this email, but then I remembered that the fix was in a hidden class. Therefore I removed the code from the email. Unfortunately my Delete key didn't work, so I had no option but to hide my code here instead of deleting it. At least I cannot see it here anymore. Can you? I hope no, because I did my best to keep it secret.

 

whoContains: position

            | node |

            (icStart isNil or: [icEnd isNil]) ifTrue: [^nil].

            receiver isCascade

                        ifFalse: [(node := receiver whoContains: position) isNil ifFalse: [^node]].

            arguments

                        do: [:arg | (node := arg whoContains: position) isNil ifFalse: [^node]].

            (position between: icStart and: icEnd) ifFalse: [^nil].

            ^self

 

/Leandro

 

*** this signature added by listserv *** *** Visit http://www.listserv.dfn.de/archives/vswe-l.html *** *** for archive browsing and VSWE-L membership management ***

*** this signature added by listserv *** *** Visit http://www.listserv.dfn.de/archives/vswe-l.html *** *** for archive browsing and VSWE-L membership management ***