[squeak-dev] The Trunk: Tools-eem.817.mcz

Chris Muller asqueaker at gmail.com
Tue Jun 12 18:17:39 UTC 2018


Hey Eliot, this change doesn't seem to be working as designed.  I have
no idea why, but my debugger keeps opening larger and larger every
time, instead of the extent it was when it was last closed...

On Sun, Jun 3, 2018 at 1:30 PM <commits at source.squeak.org> wrote:
>
> Eliot Miranda uploaded a new version of Tools to project The Trunk:
> http://source.squeak.org/trunk/Tools-eem.817.mcz
>
> ==================== Summary ====================
>
> Name: Tools-eem.817
> Author: eem
> Time: 3 June 2018, 11:30:18.12214 am
> UUID: e29d1a74-c6b6-4752-b4d0-b735061f4c9f
> Ancestors: Tools-mt.816
>
> In the absence of proper support from RealEstateAgent and the tool builder, provide a memory of the debugger's last extent, and use it when opening a full debugger.
>
> =============== Diff against Tools-mt.816 ===============
>
> Item was changed:
>   CodeHolder subclass: #Debugger
>         instanceVariableNames: 'interruptedProcess interruptedController contextStack contextStackIndex contextStackList receiverInspector contextVariablesInspector externalInterrupt proceedValue selectingPC savedCursor isolationHead failedProject errorWasInUIProcess labelString message untilExpression'
> +       classVariableNames: 'ContextStackKeystrokes ErrorRecursion ErrorRecursionGuard ErrorReportServer InterruptUIProcessIfBlockedOnErrorInBackgroundProcess SavedExtent WantsAnnotationPane'
> -       classVariableNames: 'ContextStackKeystrokes ErrorRecursion ErrorRecursionGuard ErrorReportServer InterruptUIProcessIfBlockedOnErrorInBackgroundProcess WantsAnnotationPane'
>         poolDictionaries: ''
>         category: 'Tools-Debugger'!
>
>   !Debugger commentStamp: '<historical>' prior: 0!
>   I represent the machine state at the time of an interrupted process. I also represent a query path into the state of the process. The debugger is typically viewed through a window that views the stack of suspended contexts, the code for, and execution point in, the currently selected message, and inspectors on both the receiver of the currently selected message, and the variables in the current context.
>
>   Special note on recursive errors:
>   Some errors affect Squeak's ability to present a debugger.  This is normally an unrecoverable situation.  However, if such an error occurs in an isolation layer, Squeak will attempt to exit from the isolation layer and then present a debugger.  Here is the chain of events in such a recovery.
>
>         * A recursive error is detected.
>         * The current project is queried for an isolationHead
>         * Changes in the isolationHead are revoked
>         * The parent project of isolated project is returned to
>         * The debugger is opened there and execution resumes.
>
>   If the user closes that debugger, execution continues in the outer project and layer.  If, after repairing some damage, the user proceeds from the debugger, then the isolationHead is re-invoked, the failed project is re-entered, and execution resumes in that world. !
>
> Item was changed:
>   ----- Method: Debugger>>buildFullWith: (in category 'toolbuilder') -----
>   buildFullWith: builder
>         | windowSpec listSpec textSpec |
>         windowSpec := builder pluggableWindowSpec new
>                 model: self;
>                 label: 'Debugger';
>                 children: OrderedCollection new.
> +       SavedExtent ifNotNil:
> +               [windowSpec extent: SavedExtent].
>
>         listSpec := builder pluggableListSpec new.
>         listSpec
>                 model: self;
>                 list: #contextStackList;
>                 getIndex: #contextStackIndex;
>                 setIndex: #toggleContextStackIndex:;
>                 menu: #contextStackMenu:shifted:;
>                 icon: #messageIconAt:;
>                 helpItem: #messageHelpAt:;
>                 keyPress: #contextStackKey:from:;
>                 frame: (0 at 0 corner: 1 at 0.22).
>         windowSpec children add: listSpec.
>
>
>         textSpec := self buildCodePaneWith: builder.
>         textSpec frame: (0 at 0.22corner: 1 at 0.8).
>         windowSpec children add: textSpec.
>
>         listSpec := builder pluggableListSpec new.
>         listSpec
>                 model: self receiverInspector;
>                 list: #fieldList;
>                 getIndex: #selectionIndex;
>                 setIndex: #toggleIndex:;
>                 menu: #fieldListMenu:;
>                 keyPress: #inspectorKey:from:;
>                 frame: (0 at 0.8 corner: 0.2 at 1);
>                 help: 'Receiver''s\Instance\Variables' withCRs.
>         windowSpec children add: listSpec.
>
>         textSpec := builder pluggableTextSpec new.
>         textSpec
>                 model: self receiverInspector;
>                 getText: #contents;
>                 setText: #accept:;
>                 help: '<- Select receiver''s field' translated;
>                 selection: #contentsSelection;
>                 menu: #codePaneMenu:shifted:;
>                 frame: (0.2 at 0.8 corner: 0.5 at 1).
>         windowSpec children add: textSpec.
>
>         listSpec := builder pluggableListSpec new.
>         listSpec
>                 model: self contextVariablesInspector;
>                 list: #fieldList;
>                 getIndex: #selectionIndex;
>                 setIndex: #toggleIndex:;
>                 menu: #fieldListMenu:;
>                 keyPress: #inspectorKey:from:;
>                 frame: (0.5 at 0.8 corner: 0.7 at 1);
>                 help: 'Other\Context\Bindings' withCRs.
>         windowSpec children add: listSpec.
>
>         textSpec := builder pluggableTextSpec new.
>         textSpec
>                 model: self contextVariablesInspector;
>                 getText: #contents;
>                 setText: #accept:;
>                 help: '<- Select context''s field' translated;
>                 selection: #contentsSelection;
>                 menu: #codePaneMenu:shifted:;
>                 frame: (0.7 at 0.8 corner: 1 at 1).
>         windowSpec children add: textSpec.
>
>         ^builder build: windowSpec!
>
> Item was changed:
>   ----- Method: Debugger>>windowIsClosing (in category 'initialize') -----
>   windowIsClosing
> +       "My window is being closed; if debugging save its extent.
> +        Clean up.  Restart the low space watcher."
> -       "My window is being closed; clean up. Restart the low space watcher."
>
> +       interruptedProcess ifNil: [^self].
> +       (self dependents detect: [:m| m isWindowForModel: self] ifNone: []) ifNotNil:
> +               [:topWindow| | isDebuggerNotNotifier |
> +                isDebuggerNotNotifier := self dependents anySatisfy: [:m| m isTextView].
> +                isDebuggerNotNotifier ifTrue:
> +                       [SavedExtent := topWindow extent]].
> -       interruptedProcess == nil ifTrue: [^ self].
>         interruptedProcess terminate.
>         interruptedProcess := nil.
>         interruptedController := nil.
>         contextStack := nil.
>         receiverInspector := nil.
>         contextVariablesInspector := nil.
> +       Smalltalk installLowSpaceWatcher  "restart low space handler"
> -       Smalltalk installLowSpaceWatcher.  "restart low space handler"
>   !
>
>


More information about the Squeak-dev mailing list