Using Ddms + Android Mob For Debug
Solution 1:
First select Debug perspective as:
Then set Breakpoints at places you want:
After that create a Debug configuration via Debug As->Debug Configurations... and then Debug as Android Application as shown below:
Then in Debug perspective you can trace/watch value of your desired variable by pressing F8:
That's it, you can also evaluate expressions through Expressions view. If it is not enabled select it from:
Window->Show View->Other->Debug->Expressions.
Solution 2:
I am not entirly sure how you can use DDMS to debug. However, the easiest way I have found is simply chucking load of log into your code, this then allows you to break it down and pin point exactly where your project is breaking. You can use code simlar to below:
Log.d("ID","VALUE TO PASS");
If you would like to pass something which is not a string, such as an int or outcome of a ceratin function you can use:
Log.d("ID", String.valueOf(int));
You can then view all these log in your LogCat, which can be found in 'Window - Show view - LogCat'. Hope this helps with your debugging issues.
Post a Comment for "Using Ddms + Android Mob For Debug"