[Cuis-dev] Debug leads a locked UI
Hernán Wilkinson
hernan.wilkinson at 10pines.com
Wed Feb 22 09:53:43 PST 2023
Hi Hilaire,
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.
I'm attaching the change you have to make to fix it.
The code should be:
debugSketch
codeView editor lineSelectAndEmptyCheck: [^self].
self stopSketch.
self isDocVisible ifTrue: [self toggleHelp].
codeView scroller acceptContents.
codeView editor
afterCompiling: model
do: [ :compiler :method :receiver :context | (method notNil and: [method
isQuick not]) ifTrue: [
debugger _ Debugger
openMinimalDebugging: [
method
valueWithReceiver: receiver
arguments: (context ifNil: [ #() ] ifNotNil: [ { context } ])]
to: method.
debugger layoutMorph borderWidth: 1.
codeAndViewPanel replaceSubmorph: codeView by: debugger layoutMorph.
debugger model when: #closeViews send: #stopDebbuger to: self.
debugger contextVariableInspector selectionIndex: 3.]
]
ifFail: [].
Cheers!
Hernan
On Wed, Feb 22, 2023 at 12:11 PM Juan Vuletich via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:
> Hi Hilaire,
>
> 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.
>
> Hope this helps.
>
> Cheers,
>
> On 2/21/2023 5:41 PM, Hilaire Fernandes via Cuis-dev wrote:
>
> Hi,
>
> I tested latest DrGeo with my students last Friday. There are very good
> bug discoverers! My plate is full.
>
> It is in the context of programming Smalltalk sketch. So we use the
> SmalltalkSketchEditor of DrGeo with its minimalist debugger.
>
> 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-[.])
>
> The problem also occurs with simple code as "1".
>
> 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.
>
> The involved methods are the my init of the debugger session:
>
> *DrGSmalltalkEditor>>debugSketch*
> "model ifEmpty: [^ self]."
> self stopSketch.
> self isDocVisible ifTrue: [self toggleHelp].
> codeView scroller acceptContents.
> codeView editor
> afterCompiling: model
> do: [ :compiler :method :receiver :context | method ifNotNil: [
> debugger _ Debugger
> openMinimalDebugging: [
> method
> valueWithReceiver: receiver
> arguments: (context ifNil: [ #() ] ifNotNil: [ {
> context } ])]
> to: method.
> debugger layoutMorph borderWidth: 1.
> codeAndViewPanel replaceSubmorph: codeView by: debugger
> layoutMorph.
> debugger model when: #closeViews send: #stopDebbuger to: self.
> debugger contextVariableInspector selectionIndex: 3.]
> ]
> ifFail: [].
>
> and
>
> *Debugger class>>openMinimalDebugging: aBlock to: aCompiledMethod *
> "Create a new process to debug aBlock, and step into it."
>
> | processToDebug debugger window |
> debugger _ self new.
> processToDebug _ aBlock newProcess name: 'debugIt'.
> debugger process: processToDebug context: processToDebug
> suspendedContext.
> window _ debugger openMinimalMorphic.
> [debugger interruptedContext method == aCompiledMethod]
> whileFalse: [debugger send].
> ^ window
>
>
> Then image is stuck in the method *doPrimitive: primitiveIndex method:
> meth receiver: receiver args: arguments*
>
> I also observed in this method several messages are unimplemented methods
> (colored in red in the Browser)
>
> I can't tell if it is a problem of Cuis or DrGeo...
>
> If one want to experiment the bug, just download latest DrGeo at
> http://dev.drgeo.eu and open its Smalltalk Sketch editor from the world
> menu then hit the "step by step" iconic button.
>
> Thanks
>
> Hilaire
>
> --
> GNU Dr. Geohttp://drgeo.euhttp://blog.drgeo.eu
>
>
>
> --
> Juan Vuletichcuis.stgithub.com/jvuletichresearchgate.net/profile/Juan-Vuletichindependent.academia.edu/JuanVuletichpatents.justia.com/inventor/juan-manuel-vuletichlinkedin.com/in/juan-vuletich-75611b3twitter.com/JuanVuletich
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
--
*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230222/a00424e4/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnsavedChangesTo-DrGeo-drgeo.001.cs.st
Type: application/octet-stream
Size: 909 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230222/a00424e4/attachment.obj>
More information about the Cuis-dev
mailing list