简体   繁体   中英

Debugger is not showing values of variables in Android Studio

I'm trying to debug my app in Android Studio. I set breakpoint, I set watch, I started app in debug mode on virtual device (Nexus 5X). App started, I moved into the part (Activity) where is a breakpoint... But when the activity is loaded, I usually don't see any values. Maybe one in twenty tries I get values. Why is that? I'm stuck on that problem for a while. I need to see this values to tell if app's working fine.

Why is that? Some wrong settings?

I'm using Android Studio 3.3.2, Java version 1.8.0.

My current result looks like this - there are no values anywhere, not in main window, nor in watches. View on program window

I figured it out. Debugger is working fine, but it's just not get into the part of the code where I want it to be. There's an error in my code and it stops before getting to that FOR. When I tried put breakpoint before that, I get values as I expected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM