I'm using Eclipse to code Java (for Android) and I'm trying to debug the code as I normally do (i normally do C# though).
From what I can tell, debugging in Eclipse is really bad. I don't know if I'm doing something wrong, but it seems to be just awful.
This is the code that is being run, I get some sort of exception and I want to see what the Exception is, by breaking in the "catch"-clause and viewing the variable "e":
try
{
ConnectivityManager connectivityManager = (ConnectivityManager) this.getSystemService( Context.CONNECTIVITY_SERVICE );
NetworkInfo activeNetInfo = connectivityManager.getActiveNetworkInfo();
NetworkInfo mobNetInfo = connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
NetworkInfo.State state = mobNetInfo.getState();
}
catch(Exception e)
{
Log.v("MyAp", e.toString()); // I break on this line, and want to see what e is
}
The problem is that I cannot see "e" by holding my mouse over it (as I can in my beloved Visual Studio).
Now, I know that I can bring up the tab "Variables" which lists all variables accessible from when I'm breaking, but that's not optimal.
Just so I know - Eclipse has no way of "hovering" over the variable you are interested in, as in Visual Studio?
Thanks for the answers. However, still have the same problem =(
Go to Preferences-> Java-> Editor-> Hovers and tick the box 'Variable Values'. If you want Hover to happen automatically then leave the Key Modifier section blank.
There seem to be bugs in Eclipse related to this:
So, yes it is supposed to work, but it doesn't always. I'm having this issues on some classes. It seems to be consistent which classes work and which don't, probably related to what jar the class is coming from etc, but I have no real clue as to what causes it. Would love to see some reproduction scenario.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With