How to hit breakpoint in library?
I have an Android app that is using an Android library; both projects are open in my 开发者_C百科Eclipse workspace. I want to create a breakpoint in the library code and have the debugger hit it while i'm debugging the application. Currently, when I am debugging the application, I can hit breakpoints in the app code but it will not stop at any breakpoints in the library code. Some quick googling has resulted nothing related to this task.
Is this possible? Am I doing something wrong?
Thanks, Chris
EDIT ---
OK, I see now how to attach the code to the library and hit breakpoints in the code. I can do this for one library, but for some reason I can't attach the code to the library I really need to debug, but that's an entirely different issue... Thanks for replies!!
I realized the problem now... The way to hit breakpoints in a library is to attach the source code as suggested by Cristian. However, this was simply not working for my library and I couldn't figure it out for the longest time. I found out later that in the build process of the particular library, there was an obfuscation step that rearranged the source files, changing their packages. That's why Eclipse couldn't figure out how to map the .class files in the .jar to the .java files in the workspace project... they were in differently named packages.
Thanks for the replies :)
精彩评论