How to make breakpoints in Runnable() break in Android studio?

By : Hong
Source: Stackoverflow.com
Question!

I have checked quite a few related SO posts, but been unable to get I am looking for. My question is very simple and straightforward. Here is the code:

new Thread(new Runnable() {
    @Override
    public void run() {
            android.util.Log.d("Debug", "*****breakpoint******");
    }
}).start();

I have set a breakpoint at android.util.Log.d(), so I know it is executed, but it never breaks. Breakpoints in other places work fine. I am running Android Studio 1.5.1 on Windows 10. I am using an emulator to do the test.

Could anyone offer a tip on this?

Per request, the following are screenshots of the code and logcat respectively: enter image description here enter image description here

By : Hong


Answers
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.config1
            debuggable false
        }
        debug {
            minifyEnabled false
        }
    }


This video can help you solving your question :)
By: admin