Debugger: Support captured values (KT-30740)

This commit is contained in:
Yan Zhulanow
2019-04-30 23:59:23 +03:00
parent f16459df32
commit 5777592024
12 changed files with 437 additions and 191 deletions
@@ -33,6 +33,14 @@ fun ReferenceType.safeSourceName(): String? {
return wrapAbsentInformationException { sourceName() }
}
fun ReferenceType.safeFields(): List<Field> {
return try {
fields()
} catch (e: ClassNotPreparedException) {
emptyList()
}
}
fun Method.safeLocationsOfLine(line: Int): List<Location> {
return wrapAbsentInformationException { locationsOfLine(line) } ?: emptyList()
}