Usage of Android Studio Debugger

Reading Time: 2 minutes

Before starting with new advanced topics in Android Studio, let’s learn usage of Android Studio debugger first. For example, if we want to add onClick method for some button, we can do it by open corresponding xml file (content_main.xml for example), add onClick declaration and then click on it and wait on bulb to show. Then choose Create onClick event handler.


Code signature of our method is automatically generated. Now, write code with code template, by pressing CTRL+J in Windows platform.


Then click to generate break point.


Run application in debug mode.


And see what is happening.


We can also select any variable in the code, then right click and choose “Add to Watches”


We can also set conditional break by right click on break point and setting up condition.


We can also start Android Device Monitor


From: Tools→Android→Android Device Monitor



External links:

Usage of Android Studio Debugger on Stackoverflow

Tagged with: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *