How to put a watch in Android Studio?

How to put a watch(see how a variable is modified) in Android Studio?

Some times small things are also so much importantLet's have a look..

Start by putting a break point in the class where you'd want to watch a specific variable. Run the code and once it hits your breakpoint from the Variables window frame you should see all of the variables that are accessible. Simply choose the one you'd want to watch and then right click and choose "Add to watches" from the drop-down.


enter image description here


Keep debugging and you should see the variable from the Watches window frame update when appropriate based on your code.

enter image description here

Comments

Popular posts from this blog

FCM - Firebase cloud messanfing for Notification

Read sms automatically to verify OTP

Create shapes online - Android Shapes Generator