[debugger] Wrap read action

GitOrigin-RevId: bf16d4d9163e80d20a6079ae6e62552117890ab0
This commit is contained in:
Maksim Zuev
2024-09-27 11:29:57 +02:00
committed by intellij-monorepo-bot
parent 30a5861a38
commit 55e80c9052

View File

@@ -5,6 +5,7 @@ import com.intellij.debugger.SourcePosition
import com.intellij.debugger.impl.DebuggerSession
import com.intellij.debugger.impl.DebuggerUtilsEx
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.application.runReadAction
import com.intellij.openapi.diagnostic.Attachment
import com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments
import com.intellij.openapi.diagnostic.thisLogger
@@ -56,7 +57,7 @@ object JvmSmartStepIntoErrorReporter {
if (stackTrace != null) {
add(Attachment("stacktrace.txt", stackTrace).apply { isIncluded = true })
}
add(Attachment("expression.txt", expression.text).apply { isIncluded = true })
add(Attachment("expression.txt", runReadAction { expression.text }).apply { isIncluded = true })
}
thisLogger().error("Failed to locate targets in bytecode. Details in attachments.",