Status: New Owner: ---- Labels: Type-Defect Priority-Medium
New issue 1044 by v.blonde...@gmail.com: Can't debug block local variables in GT debugger http://code.google.com/p/moose-technology/issues/detail?id=1044
Describe the problem: what do you get? what do you expect? In the GT Debugger, when you debug a block with a local variable; you can't read its value because the variable is unknown...
How to reproduce the problem: step by step if necessary Write in a Workspace : 1 = 1 ifTrue: [ |local | local := 1 ]
Debug It!
Use the through button to go into the block.
Try to inspect the local variable.
Additional information: platform, context which may impact the problem
Moose 5.0 latest - Ubuntu 13.10 - x64
Please fill in the labels with the following information: * Type-Defect * Component-GT-Debugguer * Milestone-5.0
Updates: Labels: Component-GlamorousToolkit
Comment #1 on issue 1044 by tu...@tudorgirba.com: Can't debug block local variables in GT debugger http://code.google.com/p/moose-technology/issues/detail?id=1044
Thanks for the report.
I could reproduce it on your example: 1 = 1 ifTrue: [ |local | local := 1 halt ]
However, on a regular block case, it works fine: [ |local | local := 1 halt ] value.
Also, if you define the variable outside of the block, it also works fine: |local | 1 = 1 ifTrue: [ local := 1 halt ]
Strange. Could it be related to an ifTrue: special handling?
Comment #2 on issue 1044 by v.blonde...@gmail.com: Can't debug block local variables in GT debugger http://code.google.com/p/moose-technology/issues/detail?id=1044
I think so. Because the block in the ifTrue: is inlined at the compilation...
ifTrue: alternativeBlock "Answer the value of alternativeBlock. Execution does not actually reach here because the expression is compiled in-line."
^alternativeBlock value
So the block doesn't exists really at debugging time.
Comment #3 on issue 1044 by chisvasi...@gmail.com: Can't debug block local variables in GT debugger http://code.google.com/p/moose-technology/issues/detail?id=1044
This bug also appears with the standard debugger from Pharo 3 and I guess it's a combination of two things: - ifTrue: is inlined - the debugger does not recognize variables from the workspace (https://pharo.fogbugz.com/f/cases/12432)
I'll open a bug report on the Pharo issue tracker.
Updates: Status: Duplicate
Comment #4 on issue 1044 by tu...@tudorgirba.com: Can't debug block local variables in GT debugger https://code.google.com/p/moose-technology/issues/detail?id=1044
This should be handled in the context of Pharo. I close it here.