<div dir="ltr">Hi Hilaire,<br><div> as I said, I had the same issues and as Juan mentioned there are problems with quick returns (when you have just 1 for example) or with empty lines.</div><div> I'm attaching the change you have to make to fix it.</div><div> The code should be:</div><div><br></div><div>debugSketch<br> codeView editor lineSelectAndEmptyCheck: [^self].<br> self stopSketch.<br> self isDocVisible ifTrue: [self toggleHelp].<br> codeView scroller acceptContents.<br> codeView editor <br> afterCompiling: model <br> do: [ :compiler :method :receiver :context | (method notNil and: [method isQuick not]) ifTrue: [<br> debugger _ Debugger <br> openMinimalDebugging: [<br> method<br> valueWithReceiver: receiver <br> arguments: (context ifNil: [ #() ] ifNotNil: [ { context } ])]<br> to: method.<br> debugger layoutMorph borderWidth: 1.<br> codeAndViewPanel replaceSubmorph: codeView by: debugger layoutMorph. <br> debugger model when: #closeViews send: #stopDebbuger to: self.<br> debugger contextVariableInspector selectionIndex: 3.]<br> ]<br> ifFail: [].<br></div><div><br></div><div>Cheers!</div><div>Hernan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 22, 2023 at 12:11 PM Juan Vuletich via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div bgcolor="#ffffff">
Hi Hilaire,<br>
<br>
I base Cuis we used to have the same bug. See the history of
#debugIt. If the method #isQuick, we can't open a debugger on it.<br>
<br>
Hope this helps.<br>
<br>
Cheers,<br>
<br>
On 2/21/2023 5:41 PM, Hilaire Fernandes via Cuis-dev wrote:
<blockquote type="cite">
<p><font size="4">Hi, <br>
</font></p>
<p>I tested latest DrGeo with my students last Friday. There are
very good bug discoverers! My plate is full.<br>
</p>
<p>It is in the context of programming Smalltalk sketch. So we use
the SmalltalkSketchEditor of DrGeo with its minimalist debugger.</p>
<p>One student found that when hitting the "Step by Step" button
of the editor when there is an empty code to compile, leads to
an infinite loop (hopefully breakable with alt-[.])<br>
</p>
<p>The problem also occurs with simple code as "1". <br>
</p>
<p>I don't understand the arcane of the debugger and related
compiler stuff, so help will be welcome to found out. I enclosed
the debug log.<br>
</p>
<p>The involved methods are the my init of the debugger session:</p>
<p><b>DrGSmalltalkEditor>>debugSketch</b><br>
"model ifEmpty: [^ self]."<br>
self stopSketch.<br>
self isDocVisible ifTrue: [self toggleHelp].<br>
codeView scroller acceptContents.<br>
codeView editor <br>
afterCompiling: model <br>
do: [ :compiler :method :receiver :context | method
ifNotNil: [<br>
debugger _ Debugger <br>
openMinimalDebugging: [<br>
method<br>
valueWithReceiver: receiver <br>
arguments: (context ifNil: [ #() ]
ifNotNil: [ { context } ])]<br>
to: method.<br>
debugger layoutMorph borderWidth: 1.<br>
codeAndViewPanel replaceSubmorph: codeView by:
debugger layoutMorph. <br>
debugger model when: #closeViews send: #stopDebbuger
to: self.<br>
debugger contextVariableInspector
selectionIndex: 3.]<br>
]<br>
ifFail: [].</p>
<p>and <br>
</p>
<p><b>Debugger class>>openMinimalDebugging: aBlock to:
aCompiledMethod </b><br>
"Create a new process to debug aBlock, and step into it."<br>
<br>
| processToDebug debugger window |<br>
debugger _ self new.<br>
processToDebug _ aBlock newProcess name: 'debugIt'.<br>
debugger process: processToDebug context: processToDebug
suspendedContext.<br>
window _ debugger openMinimalMorphic.<br>
[debugger interruptedContext method == aCompiledMethod]<br>
whileFalse: [debugger send].<br>
^ window <br>
</p>
<p><br>
</p>
<p>Then image is stuck in the method<b> </b><b>doPrimitive:
primitiveIndex method: meth receiver: receiver args: arguments</b></p>
<p>I also observed in this method several messages<b> </b>are
unimplemented methods (colored in red in the Browser)<br>
</p>
<p>I can't tell if it is a problem of Cuis or DrGeo...</p>
<p>If one want to experiment the bug, just download latest DrGeo
at <a href="http://dev.drgeo.eu" target="_blank">http://dev.drgeo.eu</a> and open
its Smalltalk Sketch editor from the world menu then hit the
"step by step" iconic button.</p>
<p>Thanks</p>
<p>Hilaire<br>
</p>
<pre cols="72">--
GNU Dr. Geo
<a href="http://drgeo.eu" target="_blank">http://drgeo.eu</a>
<a href="http://blog.drgeo.eu" target="_blank">http://blog.drgeo.eu</a></pre>
</blockquote>
<br>
<br>
<pre cols="72">--
Juan Vuletich
<a href="http://cuis.st" target="_blank">cuis.st</a>
<a href="http://github.com/jvuletich" target="_blank">github.com/jvuletich</a>
<a href="http://researchgate.net/profile/Juan-Vuletich" target="_blank">researchgate.net/profile/Juan-Vuletich</a>
<a href="http://independent.academia.edu/JuanVuletich" target="_blank">independent.academia.edu/JuanVuletich</a>
<a href="http://patents.justia.com/inventor/juan-manuel-vuletich" target="_blank">patents.justia.com/inventor/juan-manuel-vuletich</a>
<a href="http://linkedin.com/in/juan-vuletich-75611b3" target="_blank">linkedin.com/in/juan-vuletich-75611b3</a>
<a href="http://twitter.com/JuanVuletich" target="_blank">twitter.com/JuanVuletich</a></pre>
</div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-size:small"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal"><span style="font-weight:bold">Hernán Wilkinson</span><br>Agile Software Development, Teaching & Coaching</span></font></span></span></strong></span></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Phone: +54-011</span></font></span></span></strong></span><font face="tahoma, sans-serif" size="2">-4893-2057</font></div><div style="font-size:12.8px"><strong style="font-family:tahoma,sans-serif;font-size:xx-small"><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Twitter: @HernanWilkinson</span></font></span></span></strong></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">site: <a href="http://www.10pines.com/" style="color:rgb(17,65,112)" target="_blank">http://www.10Pines.com</a></span></font></span></span></strong></span></div><div style="font-size:12.8px"><font face="tahoma, sans-serif"><span style="border-collapse:collapse">Address: Alem 896</span></font>, Floor 6, Buenos Aires, Argentina</div></div></div></div></div></div></div></div>