• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Why can't I see variables values during debugging (on a Breakpoint) ?

Hi,

I'm trying to debug a large project in Android Studio (I'm new in this), when I stop on a breakpoint in the main module I can see all the variables in the watch window, but when I stop on a breakpoint on another module ('Project') then for each veriable I'm trying to see it shows:

"No such instance field".

I tried several solutions that I found on other forums:

  1. Restart the PC and the Android Studio.

  2. Project Clear and Rebuild.

  3. Uninstall the application (APK) from the device.

But nothing helps, on the main project/module it shows all the variables, but on the other module (which the main module use) I can't see ANY variable.

The only solution that I found (which is very Uncomfortable) is to use the object that is created from this class/module to call a global method in that module which returns the variable that I want to the main module, and there I can see it's value. Something like this:

int tempVal = 0;

deviceSdkObj = new DeviceSdk(this);
tempVal = deviceSdkObj.GetValue(42);

How can I fix this?

Thanks!
 
Last edited:
What programming language is this, and what do you mean by the term "module"?
 
What programming language is this, and what do you mean by the term "module"?

Hi,

I'm using Java, and the project contains several sub-projects (this is how I understand it's calls, all of them are part of the same application, a "Solution" in Visual Studio terms).

In the main project I can see all the variables in the watch window, but when I step into the sub-project I can't see any variable's value.

Check the example code in my first post to understand.

How to solve this?

Thanks.
 
Back
Top Bottom