[rd debugger] IJPL-233101 Pass executionId to FE so that the tab reuse works as expected

GitOrigin-RevId: 77ef862cdf4b30a72405cbcee4cbc5f52500539f
This commit is contained in:
Maksim Zuev
2026-02-03 10:29:44 +00:00
committed by intellij-monorepo-bot
parent e9c7d989d4
commit a46fdb746f
2 changed files with 13 additions and 6 deletions
@@ -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(),
@@ -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)