Cannot see final variable content inside anonymous class when debugging in Eclipse an Android app

≡放荡痞女 提交于 2019-11-30 08:47:05

I have faced similar issues while debugging applications that uses threads. I guess your application is multi-threaded one, because I used to face things like this only at that situation. This could be because when you run the program directly mostly all your threads will be started at the same time. But while in debug mode one of your thread which has the breakpoint set will be holding, where as other threads which started along would have been completed already or the other way around. That's the reason people say debugging a multi threaded application is bit more difficult unless you maintain the priority or make threads synchronized.

Hope this info helps. So instead of stopping the flow with a break point, try to print the value where you need to know the value using sysout or things like that, which is like just running the program but still debugging, your own way:)

I had the same problem recently, but updating the android SDK and then restarting eclipse fixed it. Try updating the SDK to the latest version.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!