Android - Get List of Apps in Debug mode

debug app on android device
debugging mobile apps in android
android studio debug log
how to debug in android studio line by line
android studio debug on device
android studio debugger not working
app-debug.apk install
android debug

I am trying to develop an android application where i have the following requirement. Is there any way through code, i can get the list of apps installed on devices in debug mode.

Thanks in advance.

EDIT - I tried the following code.

 PackageManager pm = getPackageManager();
         List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA);

        for (int i=0; i < packages.size(); i++)
                if ((packages.get(i).flags & ApplicationInfo.FLAG_SYSTEM) == 1)
                     //This is for System applications

                    boolean isDebuggable =  (0 != ( getApplicationInfo().flags &= ApplicationInfo.FLAG_DEBUGGABLE ) );

                    if((pm.getLaunchIntentForPackage(packages.get(i).packageName)!=null) && (isDebuggable = true) )                 
                        // Only For Apps with debug mode set true, this line should get executed 
                        // But this does not happens

Here you go,

Intent main = new Intent(Intent.ACTION_MAIN, null);
List pkgAppsList = context.getPackageManager().queryIntentActivities( main, 0);

This should give you enough information in order to kick off an application.

Debug your app, Note: The list of developer options can vary between Android versions. To enable developer options, tap the Build Number option 7 times. Take bug report: Get a copy of the current device log files to share with someone. The Wait for Debugger option is unavailable until you use Select debug app to� The debug flag is designed to help developers debug their apps, by connecting to the Java debugger, which allows them to retrieve data, dump variables etc. So what can we do if an app is in debug mode and how do we find this out. How to find out whether debug mode is active. The easiest way to find this out is from the Android Debug Bridge (adb

I tried various methods but as per my understanding, we cannot get the list of apps in debug mode seperately.

By using the flags, we can only get for the app which has this code and not other apps running on device.

Thanks anyways. If anybody has a different thought, please let me know.

Configure on-device developer options, In the previous guide about debugging third-party Android Java code, we. run the app we want to debug,; and then attach our debugger to the …or, if am on your device doesn't support stack list option, just look at the� The PC should have an Android SDK for sending advanced commands to the mobile phone. A developer should install SDK (Software Development Kit) on the PC to build apps for Android. To debug your Android phone, you must enable USB debugging mode.

From Justin's answer


val allIntent = Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_LAUNCHER)
val allApps = packageManager.queryIntentActivities(allIntent, 0)
val debugApps = arrayListOf<ActivityInfo>()

allApps.forEach {
    val appInfo = (packageManager.getApplicationInfo(
    if (0 != appInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE) {

debugApps.forEach {
    Log.d("debugApps", it.packageName)

It is possible to get all the apps that are in debug mode. In my device, I get all the apps that I've installed using Android studio.

Debugging third-party Android app code from the very beginning , You can either run an app in debug mode, or attach the debugger to an Each variable in this pane has an expand icon to expand the list of object properties� So we want to remove it these apps do slow our device so you can remove these unwanted apps. When your device root or set Android USB Debugging Mode. Follow the given steps an do the turn on Android USB Debugging mode. Lets Start. Steps To Set Android USB Debugging Mode. Set your phone to “USB debugging” Mode.

3.1: The Android Studio debugger � GitBook, Now you'll get acquainted with some of the more advanced tools: three built-in tools Logging and debugging Android apps The Logcat window reveals a list of date-and-time-stamped system messages (click to enlarge). When building an Android app, it's important that you always test your app on a real device before releasing it to users. This page describes how to set up your development environment and Android device for testing and debugging over an Android Debug Bridge (ADB) connection.

Android Studio for beginners, Part 4: Debugging tools and , This practical codelab is part of Unit 1: Get started in the Android Developer For the complete list of codelabs in the course, see Codelabs for Android Developer log, which appears in the Logcat pane in Android Studio when your app runs. ADB, the Android Debug Bridge, is one of the most powerful features built into Android. That combined with the Fastboot tool, if used right, can be incredibly useful in managing your Android device. That is the reason why we are bringing you the full list of all the ADB and Fastboot commands so that the user can make use of them when needed.

Android fundamentals 03.1: The debugger, DebugView lets you monitor your app's events in real time. Getting started To enable Analytics Debug mode on an emulated Android device, execute the following command You can click an event to see a list of associated parameters. To run your app in debug mode, you build an APK signed with a debug key and install it on a physical Android device or on the Android emulator. To set up an Android device for development, see Using Hardware Devices. For more information about the emulator provided by the Android SDK, see Using the Emulator. To debug your app in Android Studio: