[Pharo-dev] Pharo 6 cannot parallel trace through same method

Ben Coman btc at openinworld.com
Thu Feb 9 09:56:12 EST 2017


I see its in 60383. Thx Denis.
cheers -ben

On Thu, Feb 9, 2017 at 5:29 PM, Denis Kudriashov <dionisiydk at gmail.com> wrote:
> I made fix with LocalRecursionStopper. Look at fogbugs.
>
> 2017-02-08 17:13 GMT+01:00 Denis Kudriashov <dionisiydk at gmail.com>:
>>
>> Problem is related to RecursionStopper which not releases "stop method"
>> while first debugger will be close or step over.
>> Also this "stop method" is Halt>>once which could be mistake.
>>
>> Probably RecoursionStopper should be process specific variable and not
>> global registry.
>>
>> 2017-02-08 17:04 GMT+01:00 Denis Kudriashov <dionisiydk at gmail.com>:
>>>
>>> That's strange.
>>>
>>> I found that if you step over halt then you are able to halt on next
>>> call. Anyway it needs to be fixed
>>>
>>> 2017-02-08 16:37 GMT+01:00 Ben Coman <btc at openinworld.com>:
>>>>
>>>>
>>>> This has bugged me a few times recently, so I've produced a demo.
>>>> Define...
>>>>
>>>>   Object subclass: #AA
>>>> instanceVariableNames: ''
>>>> classVariableNames: ''
>>>> package: 'AAAA'
>>>>
>>>>   AA>>test
>>>> self haltOnce.
>>>> self inform: 'I got here'.
>>>>
>>>> then in playground evaluate....
>>>>   Halt resetOnce. "i.e. World > Debugging > Enable all break/inspect
>>>> once."
>>>>   AA new test.
>>>>
>>>> and as expected you get a debugger window.
>>>> Now once again without closing the debugger ...
>>>>   Halt resetOnce.
>>>>   AA new test.
>>>>
>>>> and I'd expect another debugger, but instead I'm informed 'I got here'.
>>>> Its extremely useful sometimes to parallel trace through code comparing
>>>> two cases,
>>>> and the current behaviour prevents that. .
>>>>
>>>> The Pharo 5 equivalent works as expected...
>>>>   Halt enableHaltOnce.
>>>>   AA new test.
>>>>
>>>> I'm not sure where to hang it, but the following test
>>>> differentiates between Pharo 5 & 6. (you can also run it from the
>>>> playground.)
>>>>
>>>>  testParallelTrace
>>>>     |completed p1 ds1 p2 ds2|
>>>>     completed := 0.
>>>>     Halt resetOnce. "enableHaltOnce"
>>>>     p1 := [ self haltOnce. completed := completed + 1 ] newProcess.
>>>>     ds1 := DebugSession named: 'Trace1' on: p1 startedAt: p1
>>>> suspendedContext.
>>>>     ds1 resume.
>>>>     Halt resetOnce. "enableHaltOnce"
>>>>     p2 := [ self haltOnce. completed := completed + 1 ] newProcess.
>>>>     ds2 := DebugSession named: 'Trace2' on: p2 startedAt: p2
>>>> suspendedContext.
>>>>     ds2 resume.
>>>>     self assert: (completed = 0)
>>>>
>>>> I've opened
>>>>
>>>> https://pharo.fogbugz.com/f/cases/19677/Cannot-parallel-trace-through-same-method
>>>>
>>>> cheers -ben
>>>>
>>>>
>>>>
>>>> P.S. I'm not sure if enabling the global haltOnce might cause issues.
>>>> It would be useful to be able to set it only for the DebugSession.
>>>
>>>
>>
>



More information about the Pharo-dev mailing list