Hello,
From the debugger, in the bottom panes, when debugging in a bloc of code, it seems impossible to access *at the same time* the instance variables and the method variables. Am I missing something? Hilaire -- Dr. Geo http://drgeo.eu |
2016-04-05 16:43 GMT+02:00 Hilaire <[hidden email]>: Hello, I don't understand, in Pharo 4.0 the debugger bottom left pane contains the instance variables and the right pane contains the method variables. What is missing?
|
In the debugger, I want to write test code using both instance and
method variables. As far as I can try it is not possible, or I missed something? Hilaire Le 05/04/2016 20:23, Nicolai Hess a écrit : > I don't understand, in Pharo 4.0 the debugger bottom left pane contains the > instance variables and the right pane contains the method variables. > What is missing? > -- Dr. Geo http://drgeo.eu |
See in the screenshot,
contractRate is an instance variable. When evaluating it from the method variable pane, it seems to return an index. When evaluating a method variable from the instance variable pane you get an undefined variable error... It used to be different before, and it is to say the least not convenient to debug Hilaire -- Dr. Geo http://drgeo.eu Debugger40.png (64K) Download Attachment |
2016-04-05 20:37 GMT+02:00 Hilaire <[hidden email]>: See in the screenshot, Ok, thats funny.
I do not remember that I ever tried to evaluate a method var / instance var in the instance / method inspector pane.
|
2016-04-05 20:48 GMT+02:00 Nicolai Hess <[hidden email]>:
I now see the problem. For the context inspector, the compiler can generate code for evaluating the "printit on a variable" but for variables that are in fact instance variables, it does not generate an error because it resolves the variable name and index from the (object) instance scope. This is wrong I think. With that index, the code will access not the method object instance, but the context. It therefore reads some context instance data (stackpointer for exampe!). Are you sure this ever worked? I am afraid we can not fix this. Pharo 5.0 is about to release and it contains a new Debugger. The (old) spec debugger is still there, but it does not provide the printIt/doIt commands on the isntance and context inspector panes...
|
It does not work on Pharo3.0. But it used to work!
At least it works on the Squeak5.0: from the method pane, you can evaluate both instance and method variables, usefull when you need to make some code test with both instance and method variable. So it looks like a regression appearing at least with pharo 3.0, but may be before :( Hilaire Le 06/04/2016 09:13, Nicolai Hess a écrit : > I now see the problem. > For the context inspector, the compiler can generate code for evaluating > the "printit on a variable" > but for variables that are in fact instance variables, it does not > generate an error because > it resolves the variable name and index from the (object) instance > scope. This is wrong I think. > With that index, the code will access not the method object instance, > but the context. > It therefore reads some context instance data (stackpointer for exampe!). > > Are you sure this ever worked? > I am afraid we can not fix this. Pharo 5.0 is about to release and it > contains a new Debugger. > The (old) spec debugger is still there, but it does not provide the > printIt/doIt commands on the isntance and context inspector panes... -- Dr. Geo http://drgeo.eu |
In reply to this post by HilaireFernandes
I open a bug ticket, it is important
https://pharo.fogbugz.com/f/cases/17961/Evaluating-instance-and-method-variable-in-Debugger -- Dr. Geo http://drgeo.eu |
Free forum by Nabble | Edit this page |