Hi all<br><br>&quot;Through&quot; button in Debugger does not work correct for expressions like:<br><br>&nbsp;[:a | a + 2] valueWithArguments: #(4 ).<br><br>this block is executed.<br><br>But expression:<br><br>&nbsp;[:a | a + 2] value: 4.
<br><br>works ok - block will start to debug.<br><br>I found reason in <br><br><span style="background-color: rgb(255, 255, 255);">ContextPart&gt;&gt;doPrimitive: primitiveIndex method: meth receiver: receiver args: argument&nbsp;
</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &quot;Simulate a primitive method whose index is primitiveIndex.&nbsp; The</span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; simulated receiver and arguments are given as arguments to this message.&quot;</span><br style="background-color: rgb(255, 255, 255);"><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; | value |</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &lt;primitive: 19&gt; &quot;Simulation guard&quot;
</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &quot;If successful, push result and return resuming context,</span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else ^ PrimitiveFailToken&quot;</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; (primitiveIndex = 19) ifTrue:[</span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ToolSet </span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; debugContext: self</span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; label:&#39;Code simulation error&#39;</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; contents: nil].
</span><br style="background-color: rgb(255, 255, 255);"><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; (primitiveIndex = 80 and: [receiver isKindOf: ContextPart])
</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ifTrue: [^self push: ((BlockContext newForMethod: receiver home method)</span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; home: receiver home</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; startpc: pc + 2
</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nargs: (arguments at: 1))].</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">
&nbsp;&nbsp;&nbsp; (primitiveIndex = 81 and: [receiver isMemberOf: BlockContext])</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ifTrue: [^receiver pushArgs: arguments from: self].
</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; primitiveIndex = 83 &quot;afr 9/11/1998 19:50&quot;</span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ifTrue: [^ self send: arguments first to: receiver</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; with: arguments allButFirst
</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; super: false].</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">
&nbsp;&nbsp;&nbsp; primitiveIndex = 84 &quot;afr 9/11/1998 19:50&quot;</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ifTrue: [^ self send: arguments first to: receiver
</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; with: (arguments at: 2)</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; super: false].</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; primitiveIndex = 186 ifTrue: [ &quot;closure value&quot;</span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; | m |</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m _ receiver method.</span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; arguments size = m numArgs ifFalse: [^ PrimitiveFailToken].</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ^ self activateMethod: m</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; withArgs: arguments</span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; receiver: receiver</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; class: receiver class].
</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; primitiveIndex = 187 ifTrue: [ &quot;closure valueWithArguments:&quot;</span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; | m args |</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m _ receiver method.</span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; args _ arguments first.</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; args size = m numArgs ifFalse: [^ PrimitiveFailToken].
</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ^ self activateMethod: m</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; withArgs: args</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; receiver: receiver</span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; class: receiver class].</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; primitiveIndex = 188 ifTrue: [ &quot;object withArgs:executeMethod:&quot;
</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; | m args |</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; args _ arguments first.</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m _ arguments second.</span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; args size = m numArgs ifFalse: [^ PrimitiveFailToken].</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ^ self activateMethod: m</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; withArgs: args</span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; receiver: receiver</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; class: receiver class].
</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; arguments size &gt; 6 ifTrue: [^ PrimitiveFailToken].</span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; primitiveIndex = 117 </span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ifTrue:[value _ self tryNamedPrimitiveIn: meth for: receiver withArgs: arguments]
</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ifFalse:[value _ receiver tryPrimitive: primitiveIndex withArgs: arguments].</span><br style="background-color: rgb(255, 255, 255);">
<span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; value == PrimitiveFailToken</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ifTrue: [^ PrimitiveFailToken]
</span><br style="background-color: rgb(255, 255, 255);"><span style="background-color: rgb(255, 255, 255);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ifFalse: [^ self push: value]</span><br><br>It checks primitive index for method under debug and choose how it must be performed. 
<br>But index 82 (#valueWithArguments primitive) is absent.<br>I try correct method and add new line: <br>&nbsp;&nbsp;&nbsp; (primitiveIndex = 82 and: [receiver isMemberOf: BlockContext])<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ifTrue: [^receiver pushArgs: arguments first from: self].<br><br>And now debugging by though button works right for expression&nbsp; &quot;[:a | a + 2] valueWithArguments: #(4 )&quot;.<br>But maybe it fix kills other part of system.
<br><br>I work in last Squeak.3.9.dev...image<br><br>