cle*_*vor 5 android kotlin android-studio android-studio-4.0
问题:尝试调试我的 Android 应用程序时,有效断点被禁用
当代码被触发时。然后,断点就永远不会被命中。当我将鼠标悬停时,出现错误消息“行号信息在类 <path.to.class> 中不可用。
需要注意的一些事项:
suspend函数有关。它们位于相同的协程范围内。我尝试过的事情:
shrinkResources false
minifyEnabled false
Run Code Online (Sandbox Code Playgroud)
代码
// 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}" }
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1052 次 |
| 最近记录: |