You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Code Lenses for Tests
When the `swift.showTestCodeLenses` setting is `true`, show code
lenses inline in the editor above suites and tests. This setting
defaults to `false` and must be enabled first.
The three lenses are Run, Debug, and Run w/ Coverage.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+34-13Lines changed: 34 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,12 @@
4
4
5
5
### Added
6
6
7
+
- Added code lenses to run suites/tests, configurable with the `swift.showTestCodeLenses` setting ([#1698](https://github.com/swiftlang/vscode-swift/pull/1698))
8
+
9
+
## 2.8.0 - 2025-07-14
10
+
11
+
### Added
12
+
7
13
- Add clickable toolchain selection to Swift version status bar item ([#1674](https://github.com/swiftlang/vscode-swift/pull/1674))
8
14
- Add macOS support for Swiftly toolchain management ([#1673](https://github.com/swiftlang/vscode-swift/pull/1673))
9
15
- Show revision hash or local/editing keyword in project panel dependency descriptions ([#1667](https://github.com/swiftlang/vscode-swift/pull/1667))
@@ -15,6 +21,7 @@
15
21
- Fix test explorer tests not updating on document modification ([#1663](https://github.com/swiftlang/vscode-swift/pull/1663))
16
22
- Fix improper parenting of tests w/ identical names in explorer ([#1664](https://github.com/swiftlang/vscode-swift/pull/1664))
17
23
- Ensure document symbols are provided for folders in multi-root workspaces ([#1668](https://github.com/swiftlang/vscode-swift/pull/1668))
- Prepend `/// ` when continuing documentation comments on a new line ([#1703](https://github.com/swiftlang/vscode-swift/pull/1703))
19
26
- Respect `files.exclude` setting values set to `false` ([#1696](https://github.com/swiftlang/vscode-swift/pull/1696))
20
27
@@ -83,7 +90,7 @@
83
90
### Fixed
84
91
85
92
- Prevent duplicate reload extension notifications from appearing ([#1473](https://github.com/swiftlang/vscode-swift/pull/1473))
86
-
-"Actual" and "Expected" values are shown in the right order on test failure ([#1444](https://github.com/swiftlang/vscode-swift/issues/1444))
93
+
- Actual and Expected values are shown in the right order on test failure ([#1444](https://github.com/swiftlang/vscode-swift/issues/1444))
87
94
- Correctly set the `DEVELOPER_DIR` environment variable when selecting between two Xcode installs ([#1433](https://github.com/swiftlang/vscode-swift/pull/1433))
88
95
- Prompt to reload the extension when swiftEnvironmentVariables is changed ([#1430](https://github.com/swiftlang/vscode-swift/pull/1430))
89
96
- Search for Swift packages in sub-folders of the workspace ([#1425](https://github.com/swiftlang/vscode-swift/pull/1425))
@@ -209,8 +216,8 @@ The new extension id is `swiftlang.swift-vscode`.
209
216
210
217
### Changed
211
218
212
-
- Add setting to exclude files/directories from code coverage results.
213
-
- Updated and refined settings descriptions.
219
+
- Add setting to exclude files/directories from code coverage results
220
+
- Updated and refined settings descriptions
214
221
- Added "throws" section to doc comment template
215
222
216
223
### Fixed
@@ -269,7 +276,7 @@ The new extension id is `swiftlang.swift-vscode`.
269
276
270
277
- Fix XCTest argument format when debugging multiple tests
271
278
- Add user defined and optional sanitizer/diagnostics arguments to test builds
272
-
- Silence Terminal on test runs.
279
+
- Silence Terminal on test runs
273
280
274
281
## 1.10.0 - 2024-06-07
275
282
@@ -299,13 +306,16 @@ The new extension id is `swiftlang.swift-vscode`.
299
306
## 1.9.0 - 2024-04-15
300
307
301
308
### Added
309
+
302
310
- Running tests in parallel. It is available from the drop-down next to the run button at the top of the TestExplorer. It is not available while debugging and parsing of XCT failure messages does not work prior to Swift 6.
303
311
304
312
### Changed
313
+
305
314
- If using Swift 5.10 allow for InlayHint text edits.
306
315
- If using Swift 6 name of debug adapter has changed from `lldb-vscode` to `lldb-dap`.
307
316
308
317
### Fixed
318
+
309
319
- Don't check if line above is a comment if you are on line 0 in comment completion code.
310
320
311
321
## 1.8.1 - 2024-03-06
@@ -317,13 +327,15 @@ The new extension id is `swiftlang.swift-vscode`.
317
327
## 1.8.0 - 2024-02-21
318
328
319
329
### Added
330
+
320
331
- Platform specific settings in the swift task definition.
321
332
- Environment variables to set while running a swift task.
322
333
- Setting to disable all Swift Package Manager integrations.
323
334
- Activate extension when debugging.
324
335
- Watch for changes to swift files in test targets and flag 'test discovery is required' if a file changes or is deleted.
325
336
326
337
### Changed
338
+
327
339
- Expand `~` in swift file path setting to home directory.
328
340
- Don't create test explorer if project has no tests.
329
341
- Only run test discovery after a build all task.
@@ -334,21 +346,26 @@ The new extension id is `swiftlang.swift-vscode`.
334
346
## 1.7.2 - 2024-01-03
335
347
336
348
### Added
349
+
337
350
- Setting to control action after a build error: focus on problems pane, focus on terminal or do nothing.
338
351
339
-
### Changes
352
+
### Changed
353
+
340
354
- Don't force show test pane when testing starts. Let `Testing: Open Testing` define when test pane should open.
341
355
342
356
### Fixed
357
+
343
358
- Setup of URI on readonly document viewer. This fixes jump to symbol in a swiftinterface on Windows
344
359
345
360
## 1.7.1 - 2023-12-02
346
361
347
362
### Added
363
+
348
364
- Task queue operation to spawn a process and parse its output. Using this ensures a build task does not run at the same time.
349
365
- Use spawn process task queue operation in test discovery and unedit of modules.
350
366
351
-
### Changes
367
+
### Changed
368
+
352
369
- Don't wait for SwiftPM plugin listing to finish before allowing build and run.
353
370
- If auto-resolve is disabled then also disable the initial test discovery as this can cause a resolve
354
371
@@ -359,7 +376,7 @@ The new extension id is `swiftlang.swift-vscode`.
359
376
360
377
Merge debug adapter changes from v1.6.x prerelease builds into main release.
361
378
362
-
### Changes
379
+
### Changed
363
380
364
381
- Consolidate common debug configurations when building debug configurations.
365
382
@@ -369,8 +386,6 @@ Merge debug adapter changes from v1.6.x prerelease builds into main release.
369
386
- Increase the size of stdout available to `llvm-cov` process. This fixes displaying test coverage for larger projects.
370
387
- Build product instead of target when compiling Swift Snippets. This fixes running of Snippets on macOS.
@@ -429,17 +444,20 @@ Merge debug adapter changes from v1.6.x prerelease builds into main release.
429
444
## 1.4.0 - 2023-07-05
430
445
431
446
### Added
447
+
432
448
- Add sanitizer build setting
433
449
- Build tasks are not available while other tasks are running on the package
434
450
- Add read-only document provider for swiftinterface files in preparation for go to definition for stdlib/framework symbols.
435
451
436
452
### Changed
453
+
437
454
- Add supported language configuration setting to replace Support C/C++ setting
438
455
- deprecate Support C/C++ setting
439
456
- Remove a number of unnecessary build arguments for Windows when using Swift 5.9 or later
440
457
- Configure vscode-lldb to use native expressions
441
458
442
459
### Fixed
460
+
443
461
- Require a reload when using the select Xcode developer directory command
444
462
- Reporting of errors returned by the compiler without a column number
445
463
@@ -579,15 +597,15 @@ Merge debug adapter changes from v1.6.x prerelease builds into main release.
579
597
### Added
580
598
581
599
- Support for Swift Snippets (requires Swift 5.7). Two new commands have been added `Run Swift Snippet` and `Debug Swift Snippet`.
582
-
- Sub menu to text editor right click menu. Includes commands not acccessible elsewhere `Run Swift Script`, Snippet commands and `Clean Build`.
600
+
- Sub menu to text editor right click menu. Includes commands not accessible elsewhere `Run Swift Script`, Snippet commands and `Clean Build`.
583
601
- macOS: Command to choose between macOS, iOS, tvOS and watchOS targets. Switching to a non macOS target will give you symbol completion for that target, but building your package will have undefined results.
584
602
- macOS: Command to choose between Swift toolchains from all versions of Xcode installed on your system.
585
603
586
604
### Changed
587
605
588
606
- When working out project dependencies traverse local dependencies to get full dependency chain
589
607
- Changed settings scope for a number of settings so they can be set per workspace folder
590
-
- Store hash of `Package.resolved` to compare with new `Package.resolved` whenever it has been updated, to ensure it has actaully changed before running `swift package resolve`.
608
+
- Store hash of `Package.resolved` to compare with new `Package.resolved` whenever it has been updated, to ensure it has actually changed before running `swift package resolve`.
591
609
592
610
### Fixed
593
611
@@ -662,7 +680,6 @@ Merge debug adapter changes from v1.6.x prerelease builds into main release.
662
680
### Fixed
663
681
664
682
- Running non-Swift LLDB on Windows
665
-
666
683
## 0.5.0 - 2022-05-02
667
684
668
685
Version 0.5.0 of vscode-swift now requires v1.65.0 of Visual Studio Code
@@ -759,10 +776,10 @@ Version 0.5.0 of vscode-swift now requires v1.65.0 of Visual Studio Code
759
776
760
777
- Automatic generation of launch target for running tests. This is no longer needed now we have the test explorer.
761
778
762
-
763
779
## 0.3.0 - 2022-02-22
764
780
765
781
### Added
782
+
766
783
- Function documentation comment completion. Type "///" on line above function to activate.
767
784
- Package dependency view has new right click menu. Menu entries include:
768
785
- Use Local Version: Use local version of package dependency.
@@ -774,6 +791,7 @@ Version 0.5.0 of vscode-swift now requires v1.65.0 of Visual Studio Code
774
791
- Support for building development version of package via `npm run dev-package`.
775
792
776
793
### Changed
794
+
777
795
- Build terminal window is cleared before a build
778
796
- When the Swift path or SourceKit-LSP path are changed the extension will restart to ensure the correct versions are used.
779
797
@@ -785,6 +803,7 @@ Version 0.5.0 of vscode-swift now requires v1.65.0 of Visual Studio Code
785
803
## 0.2.0 - 2022-01-20
786
804
787
805
### Added
806
+
788
807
- Build tasks for all folders in the workspace.
789
808
- Resolve and update commands which update current folder.
790
809
- Reset package and clean build commands.
@@ -795,10 +814,12 @@ Version 0.5.0 of vscode-swift now requires v1.65.0 of Visual Studio Code
795
814
- Cache contents of Package.resolved for use across different systems.
796
815
797
816
### Changed
817
+
798
818
- Cleanup Language client code
799
819
- Package dependency view updates based on current folder
800
820
801
821
### Fixed
822
+
802
823
- Use correct workspace folder in launch.json program name
Copy file name to clipboardExpand all lines: package.json
+51-1Lines changed: 51 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -306,6 +306,27 @@
306
306
"category": "Test",
307
307
"icon": "$(debug-coverage)"
308
308
},
309
+
{
310
+
"command": "swift.runTest",
311
+
"title": "Run Test",
312
+
"category": "Test",
313
+
"icon": "$(testing-run-icon)",
314
+
"enablement": "false"
315
+
},
316
+
{
317
+
"command": "swift.debugTest",
318
+
"title": "Debug Test",
319
+
"category": "Test",
320
+
"icon": "$(testing-debug-icon)",
321
+
"enablement": "false"
322
+
},
323
+
{
324
+
"command": "swift.runTestWithCoverage",
325
+
"title": "Run Test with Coverage",
326
+
"category": "Test",
327
+
"icon": "$(debug-coverage)",
328
+
"enablement": "false"
329
+
},
309
330
{
310
331
"command": "swift.openDocumentation",
311
332
"title": "Open Documentation",
@@ -562,7 +583,7 @@
562
583
}
563
584
},
564
585
{
565
-
"title": "Code Coverage",
586
+
"title": "Testing",
566
587
"properties": {
567
588
"swift.excludeFromCodeCoverage": {
568
589
"description": "A list of paths to exclude from code coverage reports. Paths can be absolute or relative to the workspace root.",
@@ -572,6 +593,23 @@
572
593
},
573
594
"default": [],
574
595
"scope": "machine-overridable"
596
+
},
597
+
"swift.showTestCodeLenses": {
598
+
"type": [
599
+
"boolean",
600
+
"array"
601
+
],
602
+
"default": true,
603
+
"markdownDescription": "Controls whether or not to show inline code lenses for running and debugging tests inline, above test and suite declarations. If set to an array, specify one or more of the following: 'run', 'debug', 'coverage'.",
0 commit comments