Debug Your App
Your debugger is one of the most valuable tools at your disposal when building an app. The debugger allows you to stop your app at any point and look at the current status of the live objects. This may be second nature for some of you, but in case you haven’t used a debugger previously, let’s talk a bit about how to use it in Android Studio.
The debugger allows us to set breakpoints throughout our app, which halts code execution and gives us the ability to look into objects available at that point in time. We can inspect objects we’ve created as well as ones inside the Android OS. From there, we can either continue the app’s execution or go through the app line by line. We start by adding a breakpoint somewhere in our code, then ...
Get Kotlin and Android Development featuring Jetpack now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.