[squeak-dev] The Trunk: System-mt.1093.mcz

H. Hirzel hannes.hirzel at gmail.com
Tue Sep 24 16:55:55 UTC 2019


Hello Marcel

I can confirm that with your changes as of update 5.3-18978  'debug
it' in a workspace works fine.
First time for how many years? 5? 7?

Dave Lewis has put into the inbox
     ReleaseBuilder-dtl.198.mcz
where he proposess

"arrange for the home Morphic project to have a parent MVC project.
The MVC project supports emergency debugging in the event of
unrecoverable Morphic problems, and will fall back on the traditional
emergency evaluator if MVC debugging fails.
"

Could this also be commited to trunk. How would a test case look like?
Some change which breaks Morphic and then an MVC project is activated
which allows to fix the cause of breaking.

Regards
Hannes

On 9/24/19, Marcel Taeumel <marcel.taeumel at hpi.de> wrote:
> Hi Hannes,
>
> "debug it" should now work fine for expressions in MVC.
>
> Best,
> Marcel
> Am 23.09.2019 17:36:34 schrieb Marcel Taeumel <marcel.taeumel at hpi.de>:
> Hi Hannes,
>
> that's a drawing glitch of the debugger. I will look into it.
>
> Best,
> Marcel
> Am 21.09.2019 11:02:17 schrieb H. Hirzel <hannes.hirzel at gmail.com>:
> I experience a strange BlockClosure>>newProcess message while
> debugging the example
> 3 factorial
>
> Best
> --Hannes
>
> On 9/20/19, Marcel Taeumel wrote:
>> I tried both and also rejecting/accepting the conflict in SmalltalkImage
>> >>
>> #handleUserInterrupt. Works fine.
>>
>> Best,
>> Marcel
>> Am 20.09.2019 19:43:08 schrieb Thiede, Christoph
>> :
>> Did you first filein your changeset or install this commit?
>> Von: Squeak-dev im Auftrag
>> von Taeumel, Marcel
>> Gesendet: Freitag, 20. September 2019 19:42:05
>> An: Alan Grimes via Squeak-dev; packages at lists.squeakfoundation.org
>> Betreff: Re: [squeak-dev] The Trunk: System-mt.1093.mcz
>>
>> Strange. If I file in the cmd-dot menu, it still works as expected in
>> recent
>> trunk.
>>
>> Best,
>> Marcel
>> Am 20.09.2019 19:20:52 schrieb Thiede, Christoph
>> :
>> FYIO: For me, this commit breaks your new cmdDot menu, my image hangs up
>> reproducibly.
>> It would be great if you could create an updated version of the menu :)
>> Otherwise, how can I safely unload the cmdDot menu to install this
>> commit?
>> Von: Squeak-dev im Auftrag
>> von commits at source.squeak.org
>> Gesendet: Dienstag, 17. September 2019 12:10:24
>> An: squeak-dev at lists.squeakfoundation.org;
>> packages at lists.squeakfoundation.org
>> Betreff: [squeak-dev] The Trunk: System-mt.1093.mcz
>>
>> Marcel Taeumel uploaded a new version of System to project The Trunk:
>> http://source.squeak.org/trunk/System-mt.1093.mcz
>> [http://source.squeak.org/trunk/System-mt.1093.mcz]
>>
>> ==================== Summary ====================
>>
>> Name: System-mt.1093
>> Author: mt
>> Time: 17 September 2019, 12:10:14.798406 pm
>> UUID: 5eb2c78e-ce42-654d-b764-57fc1e4d0521
>> Ancestors: System-mt.1092
>>
>> Refactors process debugging in general, which makes MVC debugging work
>> again:
>>
>> - adds MorphicDebugger and MVCDebugger as subclasses of Debugger to
>> untangle debugging for those different GUI frameworks
>> - removes the intermediate role of UIManager for debugging purposes --
>> focus
>> on Project, (Standard)ToolSet, and Process
>> - treat unhandled warnings the same as unhandled errors, which is through
>> the current ToolSet
>> - let SyntaxError tool use tool builder
>> - clarify #handle* and #debug* methods in ToolSet's 'debugging' category
>> - adds comments to ToolSet and StandardToolSet
>>
>> =============== Diff against System-mt.1092 ===============
>>
>> Item was changed:
>> + ----- Method: Project>>addDeferredUIMessage: (in category 'scheduling &
>> debugging') -----
>> - ----- Method: Project>>addDeferredUIMessage: (in category 'scheduling')
>> -----
>> addDeferredUIMessage: valuableObject
>> "Arrange for valuableObject to be evaluated at a time when the user
>> interface
>> is in a coherent state."
>>
>> self subclassResponsibility!
>>
>> Item was removed:
>> - ----- Method: Project>>debugMethod:forReceiver:inContext: (in category
>> 'debugging') -----
>> - debugMethod: aCompiledMethod forReceiver: anObject inContext:
>> aContextOrNil
>> - "Just execute the method and return the result. We cannot know how
>> interactive debugging works for arbitrary projects."
>> -
>> - ^ aCompiledMethod
>> - valueWithReceiver: anObject
>> - arguments: (aContextOrNil
>> - ifNil: [#()]
>> - ifNotNil:
>> [{aContextOrNil}])!
>>
>> Item was added:
>> + ----- Method: Project>>debuggerClass (in category 'scheduling &
>> debugging') -----
>> + debuggerClass
>> +
>> + ^ self subclassResponsibility!
>>
>> Item was changed:
>> + ----- Method: Project>>interruptName: (in category 'scheduling &
>> debugging') -----
>> - ----- Method: Project>>interruptName: (in category 'debugging') -----
>> interruptName: labelString
>> "Create a Notifier on the active scheduling process with the given
>> label."
>>
>> ^ self subclassResponsibility
>> !
>>
>> Item was changed:
>> + ----- Method: Project>>interruptName:preemptedProcess: (in category
>> 'scheduling & debugging') -----
>> - ----- Method: Project>>interruptName:preemptedProcess: (in category
>> 'debugging') -----
>> interruptName: labelString preemptedProcess: theInterruptedProcess
>> "Create a Notifier on the active scheduling process with the given
>> label."
>>
>> ^ self subclassResponsibility
>> !
>>
>> Item was added:
>> + ----- Method: Project>>syntaxError: (in category 'scheduling &
>> debugging')
>> -----
>> + syntaxError: aSyntaxErrorNotification
>> +
>> + ^ ToolSet debugSyntaxError: aSyntaxErrorNotification!
>>
>> Item was changed:
>> ----- Method: SmalltalkImage>>handleUserInterrupt (in category
>> 'miscellaneous') -----
>> handleUserInterrupt
>> Preferences cmdDotEnabled ifTrue:
>> + [[ToolSet handleUserInterruptRequest: 'User Interrupt']
>> fork]
>> - [[Project current interruptName: 'User Interrupt'] fork]
>> !
>>
>> Item was changed:
>> ----- Method: SyntaxErrorNotification>>defaultAction (in category
>> '*System-exceptionDescription') -----
>> defaultAction
>> + ^ToolSet handleSyntaxError: self!
>> - ^ToolSet debugSyntaxError: self!
>>
>> Item was removed:
>> - ----- Method: ToolSet class>>debug:context:label:contents:fullView: (in
>> category 'debugging') -----
>> - debug: aProcess context: aContext label: aString contents: contents
>> fullView: aBool
>> - "Open a debugger on the given process and context."
>> - self default ifNil:[
>> - (self confirm: 'Debugger request -- proceed?')
>> - ifFalse:[Processor terminateActive].
>> - ^self].
>> - ^self default debug: aProcess context: aContext label: aString
>> contents: contents fullView: aBool!
>>
>> Item was added:
>> + ----- Method: ToolSet class>>debugActiveProcessContext:label:contents:
>> (in
>> category 'debugging - convenience') -----
>> + debugActiveProcessContext: aContext label: aString contents: contents
>> +
>> + ^ self
>> + debugProcess: Processor activeProcess
>> + context: aContext
>> + label: aString
>> + contents: contents
>> + fullView: false!
>>
>> Item was removed:
>> - ----- Method: ToolSet class>>debugContext:label:contents: (in category
>> 'debugging') -----
>> - debugContext: aContext label: aString contents: contents
>> - "Open a debugger on the given context."
>> - self default ifNil:[
>> - (self confirm: 'Debugger request -- proceed?')
>> - ifFalse:[Processor terminateActive].
>> - ^self].
>> - ^self default debugContext: aContext label: aString contents:
>> contents!
>>
>> Item was removed:
>> - ----- Method: ToolSet class>>debugError: (in category 'debugging')
>> -----
>> - debugError: anError
>> - "Handle an otherwise unhandled error"
>> - self default ifNil:[ | ctx |
>> - Smalltalk
>> - logSqueakError: anError description
>> - inContext: (ctx := anError signalerContext) .
>> - self inform: (anError description, String cr, ctx
>> shortStack).
>> - ^anError return].
>> - ^self default debugError: anError!
>>
>> Item was added:
>> + ----- Method: ToolSet class>>debugInterruptedProcess:label: (in
>> category
>> 'debugging') -----
>> + debugInterruptedProcess: aSuspendedProcess label: aString
>> + "Open a debugger on the given process, which is already
>> suspended."
>> +
>> + ^ self default
>> + ifNil: [(self confirm: 'Debugger request -- proceed?')
>> ifFalse:[aSuspendedProcess terminate]]
>> + ifNotNil: [:ts | ts debugInterruptedProcess:
>> aSuspendedProcess label: aString]!
>>
>> Item was changed:
>> ----- Method: ToolSet class>>debugMethod:forReceiver:inContext: (in
>> category 'debugging') -----
>> debugMethod: aCompiledMethod forReceiver: anObject inContext: aContext
>>
>> + ^ self default
>> + ifNil: [
>> + self inform: 'Cannot debug method. It will just be
>> executed.'.
>> + aCompiledMethod
>> + valueWithReceiver: anObject
>> + arguments: (aContext ifNil: [#()] ifNotNil:
>> [{aContext}])]
>> + ifNotNil: [:ts | ts debugMethod: aCompiledMethod
>> forReceiver: anObject inContext: aContext]!
>> - self default ifNil:[^ self inform: 'Cannot debug method.'].
>> - ^self default debugMethod: aCompiledMethod forReceiver: anObject
>> inContext: aContext
>> - !
>>
>> Item was added:
>> + ----- Method: ToolSet
>> class>>debugProcess:context:label:contents:fullView:
>> (in category 'debugging') -----
>> + debugProcess: aProcess context: aContext label: aString contents:
>> contents
>> fullView: aBool
>> + "Open a debugger on the given process, which might be active,
>> suspended, or terminated."
>> +
>> + ^ self default
>> + ifNil: [(self confirm: 'Debugger request -- proceed?')
>> ifFalse: [Processor terminateActive]]
>> + ifNotNil: [:ts | ts debugProcess: aProcess context:
>> aContext label: aString contents: contents fullView: aBool]!
>>
>> Item was changed:
>> ----- Method: ToolSet class>>debugSyntaxError: (in category 'debugging')
>> -----
>> + debugSyntaxError: aSyntaxErrorNotification
>> + "Opens a tool to let the user correct the syntax error, which then
>> resumes the compiler process."
>> +
>> + ^ self default
>> + ifNil: [Project uiManager edit: aSyntaxErrorNotification
>> errorCode label: 'Syntax Error (read only)']
>> + ifNotNil: [:ts | ts debugSyntaxError:
>> aSyntaxErrorNotification]!
>> - debugSyntaxError: anError
>> - "Handle a syntax error"
>> - self default ifNil:[^self debugError: anError]. "handle as usual
>> error"
>> - ^self default debugSyntaxError: anError!
>>
>> Item was added:
>> + ----- Method: ToolSet class>>handleError: (in category 'debugging -
>> handlers') -----
>> + handleError: anError
>> + "No exception handler caught the given error. Let the user handle
>> that error through an interactive tool such as a debugger.
>> +
>> + THE ACTIVE PROCESS *IS* WHERE THE ERROR HAPPENED."
>> +
>> + ^ self default
>> + ifNil: [ | ctx |
>> + Smalltalk
>> + logSqueakError: anError description
>> + inContext: (ctx := anError signalerContext)
>> .
>> + self inform: (anError description, String cr, ctx
>> shortStack).
>> + anError return]
>> + ifNotNil: [:ts | ts handleError: anError]!
>>
>> Item was added:
>> + ----- Method: ToolSet class>>handleSyntaxError: (in category 'debugging
>> -
>> handlers') -----
>> + handleSyntaxError: anError
>> + "A syntax error (notification) occurred while parsing and compiling
>> source code. Usually, the compiling process suspends until the syntax
>> error
>> gets corrected.
>> +
>> + THE ACTIVE PROCESS *IS* THAT COMPILER PROCESS."
>> +
>> + ^ self default
>> + ifNil: [self handleError: anError]
>> + ifNotNil: [:ts | ts handleSyntaxError: anError]!
>>
>> Item was added:
>> + ----- Method: ToolSet class>>handleUserInterruptRequest: (in category
>> 'debugging - handlers') -----
>> + handleUserInterruptRequest: aString
>> + "The user wants to interrupt a process, which might be
>> unresponsive, to debug it.
>> +
>> + THE ACTIVE PROCESS *IS* A HELPER PROCESS with a priority higher
>> than the preempted one. See EventSensor >> #userInterruptWatcher."
>> +
>> + ^ self default
>> + ifNil: [self inform: 'No handler for user interrupts
>> found.']
>> + ifNotNil: [:ts | ts handleUserInterruptRequest: aString]!
>>
>> Item was added:
>> + ----- Method: ToolSet class>>handleWarning: (in category 'debugging -
>> handlers') -----
>> + handleWarning: aWarning
>> + "No exception handler caught the given warning. Let the user handle
>> that warning through an interactive tool such as a debugger.
>> +
>> + THE ACTIVE PROCESS *IS* WHERE THE WARNING HAPPENED."
>> +
>> + ^ self default
>> + ifNil: [
>> + self inform: (aWarning messageText, String cr,
>> aWarning signalerContext shortStack).
>> + aWarning resume]
>> + ifNotNil: [:ts | ts handleWarning: aWarning]!
>>
>> Item was removed:
>> - ----- Method: ToolSet class>>interrupt:label: (in category 'debugging')
>> -----
>> - interrupt: aProcess label: aString
>> - "Open a debugger on the given process and context."
>> - self default ifNil:[
>> - (self confirm: 'Debugger request -- proceed?')
>> - ifFalse:[aProcess terminate].
>> - ^self].
>> - ^self default interrupt: aProcess label: aString!
>>
>> Item was changed:
>> ----- Method: UnhandledError>>defaultAction (in category '*System-priv
>> handling') -----
>> defaultAction
>> "The current computation is terminated. The cause of the error
>> should be logged or reported to the user. If the program is operating in
>> an
>> interactive debugging environment the computation should be suspended and
>> the debugger activated."
>> + ^ToolSet handleError: self exception!
>> - ^ToolSet debugError: self exception!
>>
>> Item was changed:
>> ----- Method: UnhandledWarning>>defaultAction (in category '*System-priv
>> handling') -----
>> defaultAction
>>
>> + ^ ToolSet handleWarning: self exception!
>> - ^ ToolSet
>> - debugContext: self exception signalerContext
>> - label: 'Warning'
>> - contents: self exception messageText , '\\Select Proceed to
>> continue, or close this window to cancel the operation.' withCRs!
>>
>> Item was changed:
>> ----- Method: WrappedBreakpoint>>run:with:in: (in category 'evaluation')
>> -----
>> run: aSelector with: anArray in: aReceiver
>> | process |
>> process := Process
>> forContext: (Context
>> sender: thisContext sender
>> receiver: aReceiver
>> method: method
>> arguments: anArray)
>> priority: Processor activeProcess priority.
>> ToolSet
>> + debugProcess: process
>> - debug: process
>> context: process suspendedContext
>> label: 'Breakpoint in ' , method methodClass name , '>>#'
>> , method selector
>> contents: nil
>> fullView: true.
>> Project current spawnNewProcessIfThisIsUI: Processor
>> activeProcess.
>> thisContext swapSender: nil.
>> Processor activeProcess terminate!
>>
>>
>>
>
>


More information about the Squeak-dev mailing list