Thanks for all the help. Thanks for the sample code also. My debugging is improving.
<br/><br/><br/><div class='shrinkable-quote'><br/>> On May 17, 2016, at 3:30 PM, Ron Teitelbaum [via Smalltalk] <<a href="/user/SendEmail.jtp?type=node&node=4895740&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>> wrote:
<br/>>
<br/>> Nice description Herbert! That reminded me of one extra thing. It's kind of hidden but very useful.
<br/>>
<br/>> If you need to get out of a loop but don't want to restart and add a halt, you can click on some place in your code then select "Run To Here" from the pop up menu (right click on windows).
<br/>>
<br/>> That will continue your code until it gets to where the cursor is currently located and resume debugging from that location.
<br/>>
<br/>> That's pretty useful too.
<br/>>
<br/>> All the best,
<br/>>
<br/>> Ron
<br/>>
<br/>> > From: Herbert König
<br/>> > Sent: Tuesday, May 17, 2016 4:33 PM
<br/>> >
<br/>> > Hi Joe,
<br/>> >
<br/>> > a practical tip if you debug loops:
<br/>> >
<br/>> > myCollection collect: [:each| "You need 'through' to get into the loop"
<br/>> >
<br/>> > self doThis. "Through or over are ok here"
<br/>> >
<br/>> > self doThatWhichTakesLongToRun. "use over to go over this long running
<br/>> > method"
<br/>> >
<br/>> > somethingElse doMore "here you need to press through again or you'll
<br/>> > learn about the inner workings of collect :-))"]
<br/>> >
<br/>> > I want to mention three things:
<br/>> >
<br/>> > 1- if you are inside a loop with no other block inside you can always
<br/>> > continue with pressing 'Through'. This will then go through the next iteration
<br/>> > of the loop but step over the method sends inside the loop.
<br/>> > Methods inside the loop seem to take much longer if you go over them via
<br/>> > 'through' than if you go over them via 'over'. Especially on slow hardware.
<br/>> >
<br/>> > 2- if by accident you press 'over' while debugging the last send inside a loop
<br/>> > you get to the outer context of your loop which is very confusing at the
<br/>> > beginning. To get back into your loop you have to step 'into' the block you'll
<br/>> > see there.
<br/>> >
<br/>> > 3- if you've seen enough after being 'through' three iterations of of a
<br/>> > 1000 iteration loop you continue one level above (top pane of the
<br/>> > debugger) and debug 'over' that loop.
<br/>> >
<br/>> > Most important : experiment.
<br/>> >
<br/>> > I have no Squeak at hand so take the above just as a coarse description on
<br/>> > what you may encounter on your debugging journey.
<br/>> >
<br/>> > I usually debug my code into life and I still manage to press the wrong
<br/>> > buttons while debugging :-))
<br/>> >
<br/>> >
<br/>> > Cheers,
<br/>> >
<br/>> >
<br/>> > Herbert
<br/>> >
<br/>> > Am 17.05.2016 um 19:36 schrieb Ron Teitelbaum:
<br/>> > > Hi Joe,
<br/>> > >
<br/>> > > This is a very good question. It's something that if you been using the
<br/>> > debugger for a long time comes naturally but when you are new it seems
<br/>> > strange.
<br/>> > >
<br/>> > > Take this code for example:
<br/>> > >
<br/>> > > | lock |
<br/>> > > lock := Mutex new.
<br/>> > > lock critical: [Transcript show: 'I am here']
<br/>> > >
<br/>> > > debug this code and play with the different options to see how this works.
<br/>> > In general there are a number of times where what you want to debug is
<br/>> > inside a block. Getting into that block can be a real pain. In many cases you
<br/>> > really just want to say take me through this outer code and into that block
<br/>> > so I can debug what is inside it. (in this case Transcript show: )
<br/>> > >
<br/>> > > "Over" will skip it and "Into" will take you down the rabbit hole of code
<br/>> > that surrounds it.
<br/>> > >
<br/>> > > In this case try debugging that code using the different options and see
<br/>> > how much easier getting inside that block is when you use Through.
<br/>> > >
<br/>> > > I think the accepted description is:
<br/>> > > Through: if the debugger is going to execute a block, with this button you
<br/>> > can step though this block.
<br/>> > >
<br/>> > > and it makes sense when you think I want to step through what is inside
<br/>> > the block. "Take me through the inside of this block".
<br/>> > >
<br/>> > > Does that make sense?
<br/>> > >
<br/>> > > All the best,
<br/>> > >
<br/>> > > Ron Teitelbaum
<br/>> > >
<br/>> > >> -----Original Message-----
<br/>> > >> From: [hidden email] [mailto:beginners-
<br/>> > >> [hidden email]] On Behalf Of Joseph Alotta
<br/>> > >> Sent: Tuesday, May 17, 2016 1:07 PM
<br/>> > >> To: [hidden email]
<br/>> > >> Subject: [Newbies] whats the difference between over and through
<br/>> > >>
<br/>> > >> Greetings,
<br/>> > >>
<br/>> > >> What’s the difference between over and through in the debugger?
<br/>> > >>
<br/>> > >> Is there something that goes to the next line of code?
<br/>> > >>
<br/>> > >>
<br/>> > >> Sincerely,
<br/>> > >>
<br/>> > >> Joe.
<br/>> > >>
<br/>> > >>
<br/>> > >> _______________________________________________
<br/>> > >> Beginners mailing list
<br/>> > >> [hidden email]
<br/>> > >> <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_top" rel="nofollow" link="external">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br/>> > > _______________________________________________
<br/>> > > Beginners mailing list
<br/>> > > [hidden email]
<br/>> > > <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_top" rel="nofollow" link="external">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br/>> >
<br/>> > _______________________________________________
<br/>> > Beginners mailing list
<br/>> > [hidden email]
<br/>> > <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_top" rel="nofollow" link="external">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br/>>
<br/>> _______________________________________________
<br/>> Beginners mailing list
<br/>> [hidden email]
<br/>> <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_top" rel="nofollow" link="external">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br/>>
<br/>>
<br/>> If you reply to this email, your message will be added to the discussion below:
<br/>> <a href="http://forum.world.st/whats-the-difference-between-over-and-through-tp4895443p4895522.html" target="_top" rel="nofollow" link="external">http://forum.world.st/whats-the-difference-between-over-and-through-tp4895443p4895522.html</a><br/>> To start a new topic under Squeak - Beginners, email <a href="/user/SendEmail.jtp?type=node&node=4895740&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a>
<br/>> To unsubscribe from Squeak - Beginners, click here.
<br/>> NAML
</div><br/>
        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://forum.world.st/whats-the-difference-between-over-and-through-tp4895443p4895740.html">Re: whats the difference between over and through</a><br/>
Sent from the <a href="http://forum.world.st/Squeak-Beginners-f107673.html">Squeak - Beginners mailing list archive</a> at Nabble.com.<br/>