On Tue, Feb 7, 2017 at 5:35 PM, Denis Kudriashov <dionisi...@gmail.com>
wrote:
> Also I found another funny issue. Try debugIt following expression:
>
> 1 ifTrue: [2].
>
> You will be wondering that debugger will not able to open.

To quickly get to the point to observe the cause, you can insert...
   Halt if: [interruptedProcess suspendedContext receiver == nil].
into DebugSession>>stepInto: just after the send of #step.

Then when you step into Context>>stepToSendOrReturn
step once over "context := self step"
and the second time step in until you get to
   Context>>jump:if:

which substitutes the following context
      Context
sender: self "=Undefined>>DoIt"
receiver: rcvr "=1"
method: newMethod "=Object>>#mustBeBoolean"
arguments: args "=#()"

such that in RubSmalltalkEditor>>debug:receiver:in:
the condition block
    debugSession stepIntoUntil: [:currentContext |
currentContext method == aCompiledMethod ]
always fails, so in DebugSession>>stepIntoUntil:  the  #whileFalse:  never
exits.

A possible fix (if a bit hacky) is...
    debugSession stepIntoUntil: [:currentContext |
(currentContext method == aCompiledMethod)
                      or: [currentContext method selector==#mustBeBoolean]
].

cheers -ben

Reply via email to