Add instVar in Process
David N. Smith (IBM)
dnsmith at watson.ibm.com
Thu Oct 7 00:38:57 UTC 1999
At 17:14 -0400 10/6/99, Bob Arning wrote:
>On Wed, 6 Oct 1999 16:47:51 -0400 "David N. Smith \(IBM\)"
><dnsmith at watson.ibm.com> wrote:
>>BTW, how do you debug a process other than the one the debugger is
>>currently in?
>
>Well, you could try:
>
> Debugger openInterrupt: 'this is a process' onProcess: p.
>
>An example I tried that worked:
>
> | p |
> [
> p _ Processor activeProcess.
> 3 timesRepeat: [
> (Delay forSeconds: 30) wait.
> Processor yield
> ]
> ] fork.
> (Delay forSeconds: 1) wait.
> Debugger openInterrupt: 'this is another process' onProcess: p.
>
>The caveat is that the debugger may not like it if the process
>starts running again whilst you are poking around.
I had tried 'Process allInstances inspect' and then pasted this code
into the text window:
Debugger openContext: (self at: 8) suspendedContext
label: 'Debugger'
contents: (self at: 8) suspendedContext shortStack
(with '8' replaced with the appropriate item) and I got a debugger. I
wasn't sure how to just go away without forcing the process to do
something; don't want to Resume, can't close the window, ...
Dave
_______________________________
David N. Smith
IBM T J Watson Research Center
Hawthorne, NY
_______________________________
Any opinions or recommendations
herein are those of the author
and not of his employer.
More information about the Squeak-dev
mailing list
|