简体   繁体   中英

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

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: 在此处输入图片说明 在此处输入图片说明

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM