[Q][MVC] Debugging/Debugger related change between 3.5 to 3.6?

Sungjin Chun chunsj at embian.com
Tue Feb 14 02:14:29 UTC 2006


Thanks for your kind help. I'll try this and report the result. Thank  
you very much again.

PS)
I've seen some interest projects in your web page. Are you still  
maintaining MVC related work?

On Feb 14, 2006, at 5:48 AM, Boris Gaertner wrote:
>
> This is a difficult question and I still do not have a really good
> answer. However, it may help to point out that MVC has a general
> problem to open a window from a forked process. Try these
> examples:
>
> [ #(#aa #bb) inspect] fork
>
> [ HierarchyBrowser newFor: Boolean ] fork
>
> [Workspace new
>     contents: 'This workspace was opened in a forked process.
> This works fine under Morphic, but under MVC it does
> not work properly';
>     openLabel: 'Forked Workspace:'] fork
>
> In all these cases, you have to click into the desktop area of Squeak
> to bring up the window. (The desktop ares is region that is not
> covered by a window. An instance of ScreenController processes
> the input for that region).
>
>
> - - - - - - - - - - - - -
>
> These things are difficult and I think it will be really difficult to
> implement inter-process debugging. For your special
> example I found that, in Squeak 3.7 #5989, a modification
> in the following *class* method of Debugger can better the situation:
>
> openOn: process context: context label: title contents:  
> contentsStringOrNil
> fullView: bool
>  "Open a notifier in response to an error, halt, or notify. A  
> notifier view
> just shows a short view of the sender stack and provides a menu  
> that lets
> the user open a full debugger."
>
>  | controller errorWasInUIProcess |
>  Smalltalk isMorphic
>   ifTrue: [errorWasInUIProcess _ CurrentProjectRefactoring  
> newProcessIfUI:
> process]
>   ifFalse: [controller _ ScheduledControllers  
> activeControllerProcess ==
> process
>     ifTrue: [ScheduledControllers activeController]].
>  [
>   [ | debugger |
>    debugger _ self new process: process controller: controller  
> context:
> context.
>    bool ifTrue: [debugger openFullNoSuspendLabel: title]
>     ifFalse: [debugger openNotifierContents: contentsStringOrNil  
> label:
> title.
>      controller isNil
>       ifTrue: [ScheduledControllers activeControllerProcess suspend]].
>    debugger errorWasInUIProcess: errorWasInUIProcess.
>    Preferences logDebuggerStackToFile ifTrue: [
>     Smalltalk logError: title inContext: context to:  
> 'SqueakDebug.log'].
>    Smalltalk isMorphic
>     ifFalse: [ScheduledControllers searchForActiveController  
> "needed since
> openNoTerminate (see debugger #open...) does not set up
> activeControllerProcess if activeProcess (this fork) is not the  
> current
> activeControllerProcess (see #scheduled:from:)"].
>   ] on: Error do: [:ex |
>    self primitiveError:
>     'Orginal error: ',
>     title asString, '.
>  Debugger error: ',
>     ([ex description] on: Error do: ['a ', ex class printString]), ':'
>   ]
>  ] fork.
>  process suspend.
>
> You see that I propose to suspend the active
> controller process if (and only if) it is not the process
> to be debugged. Please try this very carefully
> (that means: after you have made backups of
> all your important things) and let me know
> wheather if facilitates your work.
>
> Gretings,
> Boris
>
>
>




More information about the Squeak-dev mailing list