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

  • Replies:0
  • OpenNot stickiedUnanswered
  • Forum posts: 1

Apr 11, 2018 12:50:41 PM via Website

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!

Be the first to answer

Recommended articles