[debugger-rd] Read source position under read action

GitOrigin-RevId: 1993c382f54e3fe3cfb4f7d5640066ebf35777b9
This commit is contained in:
Nikolay Rykunov
2025-05-10 09:03:01 +02:00
committed by intellij-monorepo-bot
parent 10dc0bf624
commit 5df113a4a1

View File

@@ -5,6 +5,7 @@ import com.intellij.ide.ui.icons.IconId
import com.intellij.ide.ui.icons.rpcId
import com.intellij.ide.vfs.VirtualFileId
import com.intellij.ide.vfs.rpcId
import com.intellij.openapi.application.EDT
import com.intellij.openapi.application.readAction
import com.intellij.openapi.util.NlsSafe
import com.intellij.openapi.util.TextRange
@@ -151,7 +152,7 @@ private suspend fun XBreakpointBase<*, *, *>.getDtoState(currentSession: XDebugS
return withContext(Dispatchers.Default) {
XBreakpointDtoState(
displayText = XBreakpointUtil.getShortText(breakpoint),
sourcePosition = sourcePosition?.toRpc(),
sourcePosition = readAction { sourcePosition?.toRpc () },
isDefault = XDebuggerManager.getInstance(project).breakpointManager.isDefaultBreakpoint(breakpoint),
logExpressionObject = logExpressionObject?.toRpc(),
conditionExpression = conditionExpression?.toRpc(),