Issue: When trying to debug my Android app, valid breakpoints are becoming disabled when the code is triggered. Then, the breakpoint is never hit. When I mouse-over, there is an error message "Line numbers info is not available in class <path.to.class>.
Some things to note:
- The class is in Kotlin
- The problem is relatively new, perhaps 1 week old
- Android version 4.0.1 and Kotlin 1.4.0-release-Studio4.0-1
- Seems related to calling nested
suspend
functions. They're in the same coroutine scope. - Breakpoints return to normal when the app is killed.
Things I tried:
- Gradle config. The build was a debug build already, so these had no effect.
shrinkResources false
minifyEnabled false
- Invalidate Caches / Restart
- Build > Clean Project
- Make breakpoints stop on all threads
- Enable, disable, enable Developer Options and USB debugging
- Re-install the app
Code
// the function-level breakpoint will be hit in the calling scope. can only debug if I manually enter the scope.
private suspend fun processDownloads(item: DownloadQueueItem, asset: Asset, downloadUrls: Map<String, List<String>>) {
try {
downloadManager.emit(DownloadEvent.DOWNLOADING(asset.compositeId, asset.id))
for (assetType in downloadUrls.keys) {
downloadUrls[assetType]?.forEach { assetUrl ->
// both suspend functions below will not be hit unless scope entered manually
yield()
downloadAsset(asset, downloadMap, assetType, assetUrl)
}
}
} catch (t: Throwable) {
loge(t) { "error downloading asset: ${t.message}" }
}
}