Skip to content

Commit 69d988b

Browse files
committed
fix: race causing lost sessions when attaching to many concurrent processes in the debug terminal
Fixes microsoft/vscode#124060
1 parent 4e88fcf commit 69d988b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ This changelog records changes to stable releases since 1.50.2. "TBA" changes he
55
## Nightly
66

77
- fix: default F5 not working on files outside workspace ([ref](https://github.com/microsoft/vscode/issues/125796))
8+
- fix: debugging with no launch config fails when tsc task detection is disabled ([ref](https://github.com/microsoft/vscode/issues/69572))
9+
- fix: race causing lost sessions when attaching to many concurrent processes in the debug terminal ([ref](https://github.com/microsoft/vscode/issues/124060))
810

911
## v1.57 (May 2021)
1012

src/ui/debugTerminalUI.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export const launchVirtualTerminalParent = (
8181
};
8282

8383
launcher.onTargetListChanged(async () => {
84+
const trusted = await vscode.workspace.requestWorkspaceTrust();
8485
const newTargets = new Set<ITarget>();
8586
for (const target of launcher.targetList()) {
8687
newTargets.add(target);
@@ -98,7 +99,8 @@ export const launchVirtualTerminalParent = (
9899
return;
99100
}
100101

101-
if (!(await vscode.workspace.requestWorkspaceTrust())) {
102+
// Detach from targets if workspace trust was not granted
103+
if (!trusted) {
102104
target.detach();
103105
return;
104106
}

0 commit comments

Comments
 (0)