Plugin not generating launch.json file for Swift Package
Describe the bug
The Swift extension for VSCode generated the launch.json file for my Swift Package once but I was having issues and wanted to have it re-generated. I deleted the files, closed and reopened VSCode and the files were not re-generated.
To Reproduce Steps to reproduce the behavior:
- Install the Swift language extension
- Open a Swift Package in VSCode
- Wait for tasks like "listing tests" and "resolving packages" to complete
- See that no
.vscodedirectory or.vscode/launch.jsonfile has been created
Expected behavior
A file has been created at .vscode/launch.json with configurations generated from the Package.swift file at the project root.
Environment
- OS: Windows 10 (19045.4291)
- Swift version:
Swift version 5.10 (swift-5.10-RELEASE)
Target: x86_64-unknown-windows-msvc
- Visual Studio Code version: 1.88.1
- vscode-swift version: 1.9.0
Additional context
I thought there might be some cache somewhere that was preventing the re-creation of launch.json so I uninstalled/reinstalled VSCode and deleted:
%userprofile%\.vscode%appdata%\Code- The
.vscodedirectory in my Package root
All to no effect
Does you package have an executable in it?
It does not (although it did initially when the files were generated), the issue that prompted me to try re-generating the launch.json is that I haven't been able to debug my unit tests. Is an executable target required for the file generation?
The tests should be available via the Test explorer.
They are available, I just can't debug them. I can open another issue for that if debugging should work without launch.json configurations but as for this issue, should I only see the launch.json file get generated when my package has an executable target?
In the TestExplorer there's two buttons for each test one to run it and one to debug it.
Yup, I see both of those buttons, the debug option does not work. Should I open a different issue for that?
In what way does it not work?
Also can you look at #728 and see if this could be related.
Closing as we've had no response