Android Studio breakpoints become "line numbers info is not available in class <path.to.class>"

1k views Asked by At

Issue: When trying to debug my Android app, valid breakpoints are becoming disabled disabled icon 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:

  1. The class is in Kotlin
  2. The problem is relatively new, perhaps 1 week old
  3. Android version 4.0.1 and Kotlin 1.4.0-release-Studio4.0-1
  4. Seems related to calling nested suspend functions. They're in the same coroutine scope.
  5. Breakpoints return to normal when the app is killed.

Things I tried:

  1. Gradle config. The build was a debug build already, so these had no effect.
shrinkResources false
minifyEnabled false
  1. Invalidate Caches / Restart
  2. Build > Clean Project
  3. Make breakpoints stop on all threads
  4. Enable, disable, enable Developer Options and USB debugging
  5. 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}" }
        }
    }
0

There are 0 answers