From 0d2f2cbba459b089000e8a31cd65d72d3c728811 Mon Sep 17 00:00:00 2001 From: Alexander Kuznetsov Date: Tue, 25 Mar 2025 00:29:49 +0100 Subject: [PATCH] [rd][debugger] IJPL-177087 Don't re-send the very same execution stack GitOrigin-RevId: 3d16ee3c9fcc4d99ba880b368288f448162035a1 --- .../debugger/impl/backend/BackendXExecutionStackApi.kt | 3 --- .../src/com/intellij/xdebugger/impl/XDebugSessionImpl.kt | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/platform/xdebugger-impl/backend/src/com/intellij/platform/debugger/impl/backend/BackendXExecutionStackApi.kt b/platform/xdebugger-impl/backend/src/com/intellij/platform/debugger/impl/backend/BackendXExecutionStackApi.kt index 759f30c23d38..0350aa6771c1 100644 --- a/platform/xdebugger-impl/backend/src/com/intellij/platform/debugger/impl/backend/BackendXExecutionStackApi.kt +++ b/platform/xdebugger-impl/backend/src/com/intellij/platform/debugger/impl/backend/BackendXExecutionStackApi.kt @@ -48,9 +48,6 @@ internal class BackendXExecutionStackApi : XExecutionStackApi { } } - // TODO[IJPL-177087]: executionStackEntity gets removed from DB because new ones come to the flow for some reason, - // so addStackFrames may end abruptly, with not all stack frames shown. - // Investigate whether it's really needed withEntities(executionStackEntity) { val executionStack = executionStackEntity.obj executionStack.computeStackFrames(firstFrameIndex, object : XExecutionStack.XStackFrameContainer { diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebugSessionImpl.kt b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebugSessionImpl.kt index b0972b6dc0bf..f1319d58629d 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebugSessionImpl.kt +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebugSessionImpl.kt @@ -142,6 +142,7 @@ class XDebugSessionImpl @JvmOverloads constructor( var currentExecutionStack: XExecutionStack? get() = executionStackFlow.value.get() private set(value) { + if (executionStackFlow.value.get() === value) return executionStackFlow.value = Ref.create(value) } private val suspendContextFlow = MutableStateFlow(null)