Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
- Prompt to cancel and replace the active test run if one is in flight ([#1774](https://github.com/swiftlang/vscode-swift/pull/1774))
- A walkthrough for first time extension users ([#1560](https://github.com/swiftlang/vscode-swift/issues/1560))

### Fixed

- Don't start debugging XCTest cases if the swift-testing debug session was stopped ([#1797](https://github.com/swiftlang/vscode-swift/pull/1797))

## 2.11.20250806 - 2025-08-06

### Added
Expand Down
6 changes: 6 additions & 0 deletions src/TestExplorer/TestRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,10 @@ export class TestRunner {
compositeToken.token
);

// If the user terminates a debugging session for swift-testing
// we want to prevent XCTest from starting.
const terminationListener = runner.onDebugSessionTerminated(() => compositeToken.cancel());

// Register the test run with the manager
folderContext.registerTestRun(runner.testRun, compositeToken);

Expand All @@ -709,6 +713,8 @@ export class TestRunner {
// Run the tests
await runner.runHandler();

terminationListener.dispose();

// Run the post-run handler if provided
if (postRunHandler) {
await postRunHandler(runner);
Expand Down