Adding Visual Studio Code tasks and launch configuration

After seeing this commit I’m wondering if it’s possible have the Visual Studio Code extension generate a tasks.json (and possible also a launch.json file for the CodeLLDB extension), based on a Package.swift file? This could significantly simplify my Visual Studio Code instructions for new users.

Or is this a potential new feature for the Swift Package Manager instead? Perhaps a generate-vscode option, analogous to generate-xcodeproj?

Alternatively, integrating something like GitHub - cgrevisse/swift-project-creation: VS Code Extension for Swift Project/Package creation. into the extension would also be beneficial, as that would allow new users to create a Swift package from within Visual Studio Code.

2 Likes

There was this PR, which provides the tasks via the SwiftPM API rather than a fixed JSON file you check in to your project. I hope @Satish_b revives it.

https://github.com/apple/sourcekit-lsp/pull/159

Yes, that looks amazing!

@Satish_b :pray: