[COROUTINE] Extra logging removed, bug in method signature fix
Relates to #KT-34906
This commit is contained in:
+1
-3
@@ -21,8 +21,6 @@ import org.jetbrains.kotlin.idea.debugger.coroutine.data.*
|
||||
import org.jetbrains.kotlin.idea.debugger.safeLineNumber
|
||||
import org.jetbrains.kotlin.idea.debugger.safeLocation
|
||||
import org.jetbrains.kotlin.idea.debugger.safeMethod
|
||||
import org.jetbrains.kotlin.idea.debugger.safeSignature
|
||||
|
||||
|
||||
class CoroutineBuilder(val suspendContext: XSuspendContext) {
|
||||
private val coroutineStackFrameProvider = CoroutineAsyncStackTraceProvider()
|
||||
@@ -172,7 +170,7 @@ class CoroutineBuilder(val suspendContext: XSuspendContext) {
|
||||
|
||||
private fun isInvokeSuspendNegativeLineMethodFrame(frame: StackFrameProxyImpl) =
|
||||
frame.safeLocation()?.safeMethod()?.name() == "invokeSuspend" &&
|
||||
frame.safeLocation()?.safeMethod()?.safeSignature() ?: "" == "(Ljava/lang/Object;)Ljava/lang/Object;" &&
|
||||
frame.safeLocation()?.safeMethod()?.signature() == "(Ljava/lang/Object;)Ljava/lang/Object;" &&
|
||||
frame.safeLocation()?.safeLineNumber() ?: 0 < 0
|
||||
}
|
||||
|
||||
|
||||
-11
@@ -21,7 +21,6 @@ class CoroutineViewDebugSessionListener(
|
||||
val log by logger
|
||||
|
||||
override fun sessionPaused() {
|
||||
log.info("XListener: sessionPaused")
|
||||
val suspendContext = session.suspendContext ?: return requestClear()
|
||||
xCoroutineView.alarm.cancel()
|
||||
renew(suspendContext)
|
||||
@@ -29,34 +28,24 @@ class CoroutineViewDebugSessionListener(
|
||||
|
||||
override fun sessionResumed() {
|
||||
xCoroutineView.saveState()
|
||||
log.info("XListener: sessionResumed")
|
||||
val suspendContext = session.suspendContext ?: return requestClear()
|
||||
renew(suspendContext)
|
||||
}
|
||||
|
||||
override fun sessionStopped() {
|
||||
log.info("XListener: sessionStopped")
|
||||
val suspendContext = session.suspendContext ?: return requestClear()
|
||||
renew(suspendContext)
|
||||
}
|
||||
|
||||
override fun stackFrameChanged() {
|
||||
xCoroutineView.saveState()
|
||||
log.info("XListener: stackFrameChanged")
|
||||
// val suspendContext = session.suspendContext ?: return requestClear()
|
||||
// log.warn("stackFrameChanged ${session}")
|
||||
// renew(suspendContext)
|
||||
}
|
||||
|
||||
override fun beforeSessionResume() {
|
||||
log.info("XListener: beforeSessionResume")
|
||||
log.warn("beforeSessionResume ${session}")
|
||||
}
|
||||
|
||||
override fun settingsChanged() {
|
||||
log.info("XListener: settingsChanged")
|
||||
val suspendContext = session.suspendContext ?: return requestClear()
|
||||
log.warn("settingsChanged ${session}")
|
||||
renew(suspendContext)
|
||||
}
|
||||
|
||||
|
||||
-12
@@ -89,10 +89,6 @@ fun Field.safeType(): Type? {
|
||||
return wrapClassNotLoadedException { type() }
|
||||
}
|
||||
|
||||
fun Method.safeSignature() {
|
||||
wrapIllegalArgumentExceptionException { signature() }
|
||||
}
|
||||
|
||||
private inline fun <T> wrapAbsentInformationException(block: () -> T): T? {
|
||||
return try {
|
||||
block()
|
||||
@@ -105,14 +101,6 @@ private inline fun <T> wrapAbsentInformationException(block: () -> T): T? {
|
||||
}
|
||||
}
|
||||
|
||||
private inline fun <T> wrapIllegalArgumentExceptionException(block: () -> T): T? {
|
||||
return try {
|
||||
block()
|
||||
} catch (e: IllegalArgumentException) {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
private inline fun <T> wrapClassNotLoadedException(block: () -> T): T? {
|
||||
return try {
|
||||
block()
|
||||
|
||||
Reference in New Issue
Block a user