From a46fdb746fce28007bec3446c2663f25cdccaf25 Mon Sep 17 00:00:00 2001 From: Maksim Zuev Date: Mon, 2 Feb 2026 17:03:41 +0100 Subject: [PATCH] [rd debugger] IJPL-233101 Pass executionId to FE so that the tab reuse works as expected GitOrigin-RevId: 77ef862cdf4b30a72405cbcee4cbc5f52500539f --- .../rpc/ExecutionEnvironmentProxyDto.kt | 2 ++ .../impl/frontend/FrontendXDebuggerSession.kt | 17 +++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/platform/execution-impl/src/com/intellij/execution/rpc/ExecutionEnvironmentProxyDto.kt b/platform/execution-impl/src/com/intellij/execution/rpc/ExecutionEnvironmentProxyDto.kt index cbae37b18f80..47b17eef09f5 100644 --- a/platform/execution-impl/src/com/intellij/execution/rpc/ExecutionEnvironmentProxyDto.kt +++ b/platform/execution-impl/src/com/intellij/execution/rpc/ExecutionEnvironmentProxyDto.kt @@ -21,6 +21,7 @@ import org.jetbrains.annotations.ApiStatus @Serializable data class ExecutionEnvironmentProxyDto( + val executionId: Long, val runProfileName: @NlsSafe String, val runConfigurationTypeId: String, val environmentContentToReuseDescriptorId: RunContentDescriptorIdImpl?, @@ -44,6 +45,7 @@ fun ExecutionEnvironment.toDto(cs: CoroutineScope): ExecutionEnvironmentProxyDto } } return ExecutionEnvironmentProxyDto( + environment.executionId, proxy.getRunProfileName(), proxy.getRunConfigurationTypeId(), environment.contentToReuse?.id as RunContentDescriptorIdImpl?, proxy.getIcon().rpcId(), proxy.getRerunIcon().rpcId(), diff --git a/platform/xdebugger-impl/frontend/src/com/intellij/platform/debugger/impl/frontend/FrontendXDebuggerSession.kt b/platform/xdebugger-impl/frontend/src/com/intellij/platform/debugger/impl/frontend/FrontendXDebuggerSession.kt index 7accefd35c1f..402c1177b842 100644 --- a/platform/xdebugger-impl/frontend/src/com/intellij/platform/debugger/impl/frontend/FrontendXDebuggerSession.kt +++ b/platform/xdebugger-impl/frontend/src/com/intellij/platform/debugger/impl/frontend/FrontendXDebuggerSession.kt @@ -357,12 +357,6 @@ class FrontendXDebuggerSession( proxy.onTabInitialized(this) } } - - tabScope.launch(Dispatchers.EDT) { - tabInfo.showTab.await() - tab.showTab() - } - val runContentDescriptor = tab.runContentDescriptor if (runContentDescriptor == null) { onTabClosed() @@ -372,6 +366,17 @@ class FrontendXDebuggerSession( runContentDescriptor.coroutineScope.awaitCancellationAndInvoke { onTabClosed() } + + val executionEnvDto = tabInfo.executionEnvironmentProxyDto + if (executionEnvDto != null) { + runContentDescriptor.executionId = executionEnvDto.executionId + } + + tabScope.launch(Dispatchers.EDT) { + tabInfo.showTab.await() + tab.showTab() + } + // don't subscribe on additional tabs if we have [ExecutionEnvironment] (it means this is Monolith) if (tabInfo.executionEnvironmentProxyDto?.executionEnvironment == null) { subscribeOnAdditionalTabs(tabScope, tab, tabInfo.additionalTabsComponentManagerId)