Reputation: 1528
I connect the debugger to my emulator and the idea console say :
Connected to the target VM, address: localhost:8612,transport:`socket`
But when i want to test my app it doesnt stop in Break points ! See this screen shot :
And this :
I test it with emulator and physical device and also rebuild project and also restart idea ! but doesn't work.
Upvotes: 15
Views: 1507
Reputation: 847
Read these similar questions
Can't reach some lines debugging android app
Cannot set Java breakpoint in Intellij IDEA
it may be cause by code shrinking in your build gradle file, you can find it build.gradle(APP Name) in your project root directory. Make sure the minifyEnable under buildType is set to false.
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
debug {
debuggable true
minifyEnabled false // set this to false
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
}
Follow the steps.
Upvotes: 3
Reputation: 2556
Did you by any chance activated ProGuard for your build? Try to turn it off. It may destroy your Breakpoints.
Also try:
Upvotes: 2
Reputation: 2365
There're message "Suspend all" in info about breakpoint, it means that IDE will skip all breakpoints, you need to turn it off (usually somewhere in debugging window there is a button to suspend breakpoints)
Or maybe it's build type. Did you check your build, is it debug?
Upvotes: 1
Reputation: 3013
First, make sure your IntellJ IDEA instance is up to date, there have been a couple of recent bugfixes related to this. (Ex: https://youtrack.jetbrains.com/issue/IDEA-81769)
Otherwise:
If android:process is set this may be your issue: https://youtrack.jetbrains.com/issue/IDEA-64456
Else you might have the problem described here: https://youtrack.jetbrains.com/issue/IDEA-95721
Unfortunately this second link lacks any sort of concrete help from the IntellJ team yet. One workaround is to use Eclipse for debugging temporarily, although that's a kinda awful solution.
Upvotes: 6
Reputation: 644
set the breakpoint on
your_view.setOnListItemSelectedListener();
and on if(...)
in OnListItemSelected
Upvotes: 2