

To run the app with the debugger, follow these steps: Furthermore, if you want to debug code that only runs when the app launches, you need to launch the app with the debugger already attached. If you know that you want to use the debugger from the start, you can save time when you run the app with the debugger. Next, you learn how to launch an app with the debugger already attached. You attached the debugger to your app! Don't worry about what this means or what you can do with the debugger because that's covered later in this codelab. Select and then click OK.Ī Debug pane appears at the bottom of Android Studio with a message that indicates that the debugger is attached to the target device or emulator.After the app runs on a device or emulator, click Attach Debugger to Android Process.Ī Choose Process dialog opens in which you can choose the process to which you want to attach the debugger.To attach the debugger to an app process, follow these steps:

If your app is already running, you can attach the debugger to it. Once you're familiar with both ways, you can pick the one that you prefer or whichever one is required. Attach the debugger to an existing app process that runs on a device or emulator.īoth ways accomplish the same thing to a certain extent.There are two ways to run the debugger alongside your app: You can browse the code in the Github repository. Note: The starter code is on the main branch of the downloaded repository. $ cd basic-android-kotlin-compose-training-dice-roller You can also skip the video and start the codelab instructions right away.Īlternatively, you can clone the Github repository for the code: $ git clone It's recommended to expand the video to full screen (with this icon in the lower right corner of the video) so you can see Android Studio and the code more clearly. If you'd like to watch one of the course instructors complete the codelab, play the below video. The solution code for the Dice Roller app in Compose.A computer with Android Studio installed.What the debugger is typically used for.How to use some fundamental features of the debugger.How to launch an app with the debugger attached.How to attach the debugger to an Android app.

