Helloheyyyy
Helloheyyyy

Reputation: 63

How to debug android codes after loops in Eclipse

I have found my app returned error after a for loop. Are there any tricks for me to just run through the for-loop and then debug? I have studied some posts saying that using Ctrl+R could help. However my latest version eclipse cannot found such a function.

Upvotes: 1

Views: 99

Answers (2)

Jamil
Jamil

Reputation: 5535

You can do Step debugging in Eclipse

mark a break point in the code where you want ( mark at the blue line as shown with a small blue circle)

enter image description here

then run->Debug Configuration and start the app

and when the program starts it will stop at that line where you put break point.

enter image description here

just dont forget to change from JAva or DDMS to Debug

enter image description here

also you can see various stepping code things in run menu while debugging

enter image description here

I hope it helps you

Upvotes: 1

PageNotFound
PageNotFound

Reputation: 2320

1.use Log.i() or System.out.println() to print something.
2.just see debug information in logcat
3.reduce loop times or replace loop with other simple code, then run the app again

Upvotes: 0

Related Questions