简体   繁体   中英

How to debug an android application

Over the course of this project so far i've gotten used to looking at the logcat to tell me where the problem is when my app crashes, but my current problem doesn't crash the app it just does something it shouldn't and i can't find the code that's casuing the problem.

I've tried to debug before and go through the code line by line to see what causes it but for this android app it wont work. These are the steps i have taken.

  1. added debuggable = true to the manifest inside the opening application tag.

  2. added a line breakpoint on the line i wish the app to stop debugging on.

  3. I switch to debug perspective in eclipse and start debugging the application

It seems to just stop when the console says this: Attempting to connect debugger to 'w1279057.CW1' on port 8688

Have i done something wrong?

如果您使用的是Eclipse,则http://www.vogella.de/articles/EclipseDebugging/article.html并使用LogCat

If you are triying to debug on a real phone you need to enable USB debugging in the settings. It is explained here: http://www.groovypost.com/howto/mobile/how-to-enable-usb-debugging-android-phone/

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