Debug your app in Android (Part 1)

Vrushali Raut
2 min readAug 26, 2018

--

In my previous article i have explained What is debugging? and example of debugging where we need to debug our app.

To Start android app development, having good knowledge of debugging is very necessary so let’s start with enabling the developer options in mobile phone.

Enable developer options and debugging

Developer options

On Android 4.1 and lower, the Developer options screen is available by default. On Android 4.2 and higher, you must enable this screen as follows:

  1. Open the Settings app.
  2. (Only on Android 8.0 or higher) Select System.
  3. Scroll to the bottom and select About phone.
  4. Scroll to the bottom and tap Build number 7 times.
  5. Return to the previous screen to find Developer options near the bottom.

At the top of the Developer options screen, you can toggle the options on and off.

Next, you should scroll down a little and enable USB debugging. This allows Android Studio and other SDK tools to recognise your device when connected via USB, so you can use the debugger and other tools.

Debugging

Debugging options enabled

Debugging options provide ways to configure on-device debugging, and to establish communication between the device and your development computer.

Enable USB debugging so your Android device can communicate with your development machine through Android Debug Bridge (adb).

The Wait for Debugger option is unavailable until you use Select debug app to select the app to debug. If you enable Wait for Debugger, the selected app waits for the debugger to attach before it executes.

We will see how to use debugger tool and BreakPoints to find out the root cause of the problem in next blog.. so stay tuned.. 💚

--

--

Vrushali Raut
Vrushali Raut

Written by Vrushali Raut

I’m a Engineer. Ex Spenmo, Gojek, Leftshift . I love to share my experiments, learnings via Blogs. https://twitter.com/vrushaliSRaut

Responses (1)