Hi,
Since Pharo 2.0 on Linux (20599) i have strange behavior when i'm trying to debug a method step by step. Step to reproduce : 1. Create a new Package 'TEST' 2. Create a new subclass 'Test' 3. Create a method 'Validation' Validation
|col| col := OrderedCollection new. col add: '1'. col add: '2'. col add: '3'. 4. Add a breakpoint on this method. 5. Open a workspace 6. Write on it : Test new validation. 7. Alt-d to do it A debugger window appear. I choose 'debug' and then choose my method. I can see my code in the window.
Normally when you click on 'Over' you can go step by step through your instructions. In 1.4 next instruction was highlighted, but not in 2.0 and 3.0. So you can't see what is done.
This feature in 1.4 save me a lot of time fighting bugs and learn smalltalk. Is this a bug ? someone has already seen that ? Regards,
Xavier. |
Hello,
The problem is that the breakpoint mechanism is implemented extremely naively… (I once already suggested, no, urged, to remove it because it is just not good enough). Now in addition, the machinary for finding what to highlight is *extremely* complicated in the old compiler framework. The good news is that we have a new framework nearly ready in 3.0 that solves all of this…including *real* breakpoints… this is in active development and will be ready soon. But as it is a quite radical change, this is of course for 3.0 only. Now the problem is that nobody is willing to look at debugger highlighting related issue in the old framework. (there was a bug open for 4 years… with quite some brave people burning a lot of time without a solution). I want to spend all energy and time to finish the new one… I just don't think that putting effort in the old Debugger is time well spend. Breakpoints there are not yet working at all in the new framework… but they will at soonish. I might even remove the old implementation, it's really just a bad hack and it was amazing that it worked at all. Marcus On May 4, 2013, at 5:34 PM, xavier MESSNER <[hidden email]> wrote: > Hi, > > Since Pharo 2.0 on Linux (20599) i have strange behavior when i'm trying to debug a method step by step. > > Step to reproduce : > > 1. Create a new Package 'TEST' > 2. Create a new subclass 'Test' > 3. Create a method 'Validation' > > Validation > |col| > col := OrderedCollection new. > col add: '1'. > col add: '2'. > col add: '3'. > > 4. Add a breakpoint on this method. > 5. Open a workspace > 6. Write on it : Test new validation. > 7. Alt-d to do it > > A debugger window appear. I choose 'debug' and then choose my method. I can see my code in the window. > Normally when you click on 'Over' you can go step by step through your instructions. > In 1.4 next instruction was highlighted, but not in 2.0 and 3.0. So you can't see what is done. > This feature in 1.4 save me a lot of time fighting bugs and learn smalltalk. > > Is this a bug ? someone has already seen that ? > > Regards, > > Xavier. |
Hi,
Thanks for the information. I just discovered that i can use #haltOnce and #halt to stop execution and view step by step what happening. Highlighting is working fine this way. Thanks to smalltalk community a video exist here. I can migrate my code and use it daily now. I think i will have a lot of fun :) Regards. Xavier. |
there is also haltIf: which lets you halt only when the method is executed from the message passed as argument.
Stef On May 5, 2013, at 2:53 PM, Xavier MESSNER <[hidden email]> wrote: > Hi, > > Thanks for the information. > I just discovered that i can use #haltOnce and #halt to stop execution and > view step by step what happening. Highlighting is working fine this way. > > Thanks to smalltalk community a video exist here > <http://www.jarober.com/blog/blogView?showComments=true&printTitle=ST_4U_270:__Halt_Once&entry=3522309581> > . > > I can migrate my code and use it daily now. > > I think i will have a lot of fun :) > > Regards. > > Xavier. > > > > -- > View this message in context: http://forum.world.st/Pharo-2-0-debugger-strange-behavior-tp4685632p4685828.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > |
Free forum by Nabble | Edit this page |