Difficulties with step by step debugging in android.
I want to perform step by step debugging in android. I am working in Eclipse. Whenever I start my android application and hit a breakpoint a problem occurs. Here is the problem:
I go into debug mode and I see that m开发者_StackOverflow社区y breakpoint has been hit, but now that I want to step through execution, it doesn't work. As soon as I press f5 or press the step over/step into key a new window opens saying the following:
CLASS FILE EDITOR
SOURCE NOT FOUND
What do I do? I have attached the file that I am debugging to the source but it is still not working? What does this error mean?
Try to set breakpoints. If you "stop" your app you can't tell in wich part of the source you actually are. (Your app youses the android-libs and therefore you're maybe executing some lines of the libs at the time you press the step oper/into key. If you set breakpoints, the app stops within YOUR code and not within the libs.
Have you tried using DDMS instead? I have found the problem with my code many times using it.
Using f6 (step over) as the post above recommends also works. What exactly are you trying to debug?
Maybe the debugger is pointing to a library code(Did you add any external library reference?).
You could actually download the Android source and continue debugging in the android source files. Sometimes it is actually useful knowing what is going on behind the cover.
Also, try hitting F6 (if you are using Eclipse), as it will not enter deeper in functions but continue line to line. Or set a pile of breakpoints and hit resume with F8 if that is more convenient to you.
精彩评论