[squeak-dev] Process-specific state difficult to debug...

Frank Shearar frank.shearar at gmail.com
Thu Jan 29 16:24:14 UTC 2015


On 29 January 2015 at 16:22, Frank Shearar <frank.shearar at gmail.com> wrote:
> On 29 January 2015 at 09:06, Tobias Pape <Das.Linux at gmx.de> wrote:
>> Hi
>>
>> On 29.01.2015, at 09:50, Marcel Taeumel <marcel.taeumel at student.hpi.uni-potsdam.de> wrote:
>>
>>> Hi!
>>>
>>> There are process-specific variables. However, #doStep in Debugger does
>>> #completeStep: on the process object and Processor >> #activeProcess will be
>>> wrong during that execution.
>>>
>>> Is this a general problem of global state or could we fix that somehow?
>>
>> The same problem exists for DynamicVariables that are not implemented with
>> process-specific variables but with Notifications. Just want to throw that
>> in :)
>
> Yes: debugging with dynamic variables is Hard(tm), regardless of
> whether nice (delimited, through Notifications) or nasty (undelimited,
> through ProcessSpecificVariable), because you typically want the value
> of the variable in the context in which the code under debug is
> running, but asking it "what is your value?" returns the value of the
> variable in the context of the debugger.
>
> Which I guess is the answer: the debugger needs to recognise you're
> working with a dynamic variable, and it must perform that
> current-value-lookup in the correct context (that of the process
> you're debugging).

Oh, I should add: I usually pin the (current) value of the dynamic
variable down by assigning its value to a local variable. It's
invasive, but it does work.

frank
>
>> Best
>>         -Tobias


More information about the Squeak-dev mailing list