|
|
|
Re: Strange watch variables behavior [message #148835 is a reply to message #148491] |
Tue, 16 March 2004 10:55 |
Eclipse User |
|
|
|
Originally posted by: daniel.megert.gmx.net
Oliver wrote:
>No. I did look in the bug database and I didn't see it. Since it
>seems so big I figured if it really was a bug somebody else would
>have seen it by now, so I figured I was doing something wrong.
>
>
I assume you now filed the bug ;-)
Dani
>Johan Compagner wrote:
>
>
>
>>seems like a bug to me.
>>dit you file a bug report?
>>
>>johan
>>
>>Oliver wrote:
>>
>>
>>>I've just started using Eclipse, and so far I really like it, but I
>>>have one major problem I can't seem to fix. I finally tracked the
>>>problem down so its repeatable, but its very strange. Do the
>>>following:
>>>
>>>Create a new project and a package called foo. Now create a class
>>>called foo in that package like this:
>>>
>>>package foo;
>>>
>>>public class foo
>>>{
>>> int var;
>>>
>>> public foo(int x)
>>> {
>>> var = x;
>>> }
>>>
>>> public void print()
>>> {
>>> System.out.println("HI");
>>> }
>>>
>>>}
>>>
>>>Now create a file in the default package with a class main in
>>>Main.java:
>>>
>>>import foo.*;
>>>
>>>public class Main {
>>>
>>> public static void main(String[] args)
>>> {
>>> //this is as simple as they come
>>> int i, j;
>>> i = 10;
>>> j = 20;
>>> i = 3*j;
>>> foo x = new foo(7);
>>> System.out.println("i : " + Integer.toString(i));
>>> }
>>>}
>>>
>>>OK. Now start debugging the app and put a breakpoint on the j=20
>>>line. When you get there find the value of i in the variables
>>>window
>>>and choose "watch" from the context menu. As expected it shows up
>>>in
>>>the expressions window. Now step through the code. The value of i
>>>is correctly updated in the expressions window until you execute
>>>the
>>>foo x = new foo(7); line. At that point the value of i in the
>>>expressions window is displayed as "<error(s) during the
>>>evaluation>".
>>>
>>>From this point on (I have other code that does a lot more than
>>>this) its impossible to put a watch on ANY variable in ANY method!!
>>>What's
>>>up with that?? If I rename the class in the package from foo to
>>>bar
>>>it doesn't matter. All that matters is that I've accessed
>>>something
>>>from that package! Am I doing something wrong or is this a bug?
>>>
>>>
>
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.04386 seconds