Debugger in 4.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Debugger in 4.0

HilaireFernandes
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


Reply | Threaded
Open this post in threaded view
|

Re: Debugger in 4.0

Nicolai Hess-3-2


2016-04-05 16:43 GMT+02:00 Hilaire <[hidden email]>:
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?

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?
 

Hilaire

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: Debugger in 4.0

HilaireFernandes
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


Reply | Threaded
Open this post in threaded view
|

Re: Debugger in 4.0

HilaireFernandes
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
Reply | Threaded
Open this post in threaded view
|

Re: Debugger in 4.0

Nicolai Hess-3-2


2016-04-05 20:37 GMT+02:00 Hilaire <[hidden email]>:
See in the screenshot,

contractRate is an instance variable. When evaluating it from the method
variable pane, it seems to return an index.

Ok, thats funny.
 

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

I do not remember that I ever tried to evaluate a
method var / instance var
in the
instance / method
inspector pane.

 


Hilaire
--
Dr. Geo
http://drgeo.eu

Reply | Threaded
Open this post in threaded view
|

Re: Debugger in 4.0

Nicolai Hess-3-2


2016-04-05 20:48 GMT+02:00 Nicolai Hess <[hidden email]>:


2016-04-05 20:37 GMT+02:00 Hilaire <[hidden email]>:
See in the screenshot,

contractRate is an instance variable. When evaluating it from the method
variable pane, it seems to return an index.

Ok, thats funny.
 

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

I do not remember that I ever tried to evaluate a
method var / instance var
in the
instance / method
inspector pane.


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...

 
 


Hilaire
--
Dr. Geo
http://drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: Debugger in 4.0

HilaireFernandes
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


Reply | Threaded
Open this post in threaded view
|

Re: Debugger in 4.0

HilaireFernandes
In reply to this post by HilaireFernandes