[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.safeLineNumber
|
||||||
import org.jetbrains.kotlin.idea.debugger.safeLocation
|
import org.jetbrains.kotlin.idea.debugger.safeLocation
|
||||||
import org.jetbrains.kotlin.idea.debugger.safeMethod
|
import org.jetbrains.kotlin.idea.debugger.safeMethod
|
||||||
import org.jetbrains.kotlin.idea.debugger.safeSignature
|
|
||||||
|
|
||||||
|
|
||||||
class CoroutineBuilder(val suspendContext: XSuspendContext) {
|
class CoroutineBuilder(val suspendContext: XSuspendContext) {
|
||||||
private val coroutineStackFrameProvider = CoroutineAsyncStackTraceProvider()
|
private val coroutineStackFrameProvider = CoroutineAsyncStackTraceProvider()
|
||||||
@@ -172,7 +170,7 @@ class CoroutineBuilder(val suspendContext: XSuspendContext) {
|
|||||||
|
|
||||||
private fun isInvokeSuspendNegativeLineMethodFrame(frame: StackFrameProxyImpl) =
|
private fun isInvokeSuspendNegativeLineMethodFrame(frame: StackFrameProxyImpl) =
|
||||||
frame.safeLocation()?.safeMethod()?.name() == "invokeSuspend" &&
|
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
|
frame.safeLocation()?.safeLineNumber() ?: 0 < 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-11
@@ -21,7 +21,6 @@ class CoroutineViewDebugSessionListener(
|
|||||||
val log by logger
|
val log by logger
|
||||||
|
|
||||||
override fun sessionPaused() {
|
override fun sessionPaused() {
|
||||||
log.info("XListener: sessionPaused")
|
|
||||||
val suspendContext = session.suspendContext ?: return requestClear()
|
val suspendContext = session.suspendContext ?: return requestClear()
|
||||||
xCoroutineView.alarm.cancel()
|
xCoroutineView.alarm.cancel()
|
||||||
renew(suspendContext)
|
renew(suspendContext)
|
||||||
@@ -29,34 +28,24 @@ class CoroutineViewDebugSessionListener(
|
|||||||
|
|
||||||
override fun sessionResumed() {
|
override fun sessionResumed() {
|
||||||
xCoroutineView.saveState()
|
xCoroutineView.saveState()
|
||||||
log.info("XListener: sessionResumed")
|
|
||||||
val suspendContext = session.suspendContext ?: return requestClear()
|
val suspendContext = session.suspendContext ?: return requestClear()
|
||||||
renew(suspendContext)
|
renew(suspendContext)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun sessionStopped() {
|
override fun sessionStopped() {
|
||||||
log.info("XListener: sessionStopped")
|
|
||||||
val suspendContext = session.suspendContext ?: return requestClear()
|
val suspendContext = session.suspendContext ?: return requestClear()
|
||||||
renew(suspendContext)
|
renew(suspendContext)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun stackFrameChanged() {
|
override fun stackFrameChanged() {
|
||||||
xCoroutineView.saveState()
|
xCoroutineView.saveState()
|
||||||
log.info("XListener: stackFrameChanged")
|
|
||||||
// val suspendContext = session.suspendContext ?: return requestClear()
|
|
||||||
// log.warn("stackFrameChanged ${session}")
|
|
||||||
// renew(suspendContext)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun beforeSessionResume() {
|
override fun beforeSessionResume() {
|
||||||
log.info("XListener: beforeSessionResume")
|
|
||||||
log.warn("beforeSessionResume ${session}")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun settingsChanged() {
|
override fun settingsChanged() {
|
||||||
log.info("XListener: settingsChanged")
|
|
||||||
val suspendContext = session.suspendContext ?: return requestClear()
|
val suspendContext = session.suspendContext ?: return requestClear()
|
||||||
log.warn("settingsChanged ${session}")
|
|
||||||
renew(suspendContext)
|
renew(suspendContext)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-12
@@ -89,10 +89,6 @@ fun Field.safeType(): Type? {
|
|||||||
return wrapClassNotLoadedException { type() }
|
return wrapClassNotLoadedException { type() }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Method.safeSignature() {
|
|
||||||
wrapIllegalArgumentExceptionException { signature() }
|
|
||||||
}
|
|
||||||
|
|
||||||
private inline fun <T> wrapAbsentInformationException(block: () -> T): T? {
|
private inline fun <T> wrapAbsentInformationException(block: () -> T): T? {
|
||||||
return try {
|
return try {
|
||||||
block()
|
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? {
|
private inline fun <T> wrapClassNotLoadedException(block: () -> T): T? {
|
||||||
return try {
|
return try {
|
||||||
block()
|
block()
|
||||||
|
|||||||
Reference in New Issue
Block a user