2017-02-08 16:37 GMT+01:00 Ben Coman <[email protected]>: > > 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 > > I think this is a result of the change how haltOnce are now implemented with metalinks.
> > > 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. >
