pharo-spec / NewTools

All development tools for Pharo, developed with Spec
21 stars 54 forks source link

"Run To" should stop in a child frame if the cursor is within a block #848

Open daniels220 opened 1 month ago

daniels220 commented 1 month ago

If I "Debug It" on the following, place the cursor as indicated and "Run To":

#(1 2 3 4) collect: [:each | each * 2]
                               ^
self someOtherCode.

I expect it to stop on the first iteration of the loop, but instead it steps over the whole loop and stops on the next statement. Seems like it would be appropriate for "Run To" to logically consist of a series of "Step Through" operations rather than "Step Over"s. I'm not sure what the performance cost of a "Step Through" is when in fact the step performed does not involve a block—if it's substantial, perhaps it could be detected if the cursor is within a block in order to do this conditionally. In any case, it would be good to fix #847 first to speed the whole thing up.