Here’s a Christmas present for those of you who prefer (or have to) develop Swift packages outside of Xcode - today we’re releasing the initial version of the VSCode Swift extension
You can find the initial 0.1.0 release on the Visual Studio Marketplace here.
The extension aims to provide a first-class experience for developing Swift packages in VSCode. It’s being guided by the SSWG but a huge shoutout goes to @svanimpe and @adam-fowler who have done all of the work to get it ready for an initial release! One of the goals for 2021 for the SSWG was to improve the tooling for Swift on the server and this fills an important part of that.
The highlights of the extension include:
Automatic task creation
Package dependency view
Code completion
Jump to definition, peek definition, find all references, symbol search
Error annotations and apply suggestions from errors
Automatic generation of launch configurations for debugging with CoreLLDB
I’ve been using it for a couple of weeks now to work on some Vapor projects and it’s been great.
It would be remiss not to mention the extensions that have inspired this work, especially the Maintained Swift Development Environment. It would have been awesome to integrate them but proved too difficult in the end with differing aims.
Please note that this is a 0.1.0 release so it is not feature complete and there will be bugs that need to be fixed. We hope that lots of people will try it out and get involved!
Future Aims
Over the next couple of weeks I’ll be working to integrate the VSCode test explorer to provide a similar test experience to Xcode (run individual tests or classes of tests from the UI) and I’m sure there will be many feature requests and bugs to fix! Please create an issue on the GitHub repo or post on the #vscode-swift channel on Slack.
Any contributions would be amazing and this is a community driven extension so if you want to get involved, please do!
While @0xTim is working on the test explorer I am hoping to be improving the multi-project workspace support and enabling local editing of swift package dependencies.
Yes it works on Windows, thanks to @svanimpe. There are some issues with debug symbols I believe but @svanimpe will be able to give more details on that.
This is really really great. I'm teaching underprivileged kids in my neighbourhood how to code Swift, but since they don't have Macs I'm using GitHub Codespaces with VSCode – this is going to make their learning experience so, so much better. Thanks a lot to the whole team!
This is really great. I installed it on a Raspberry Pi, and was building and remote-debugging from my Mac instantly. It's the first time I've managed to get LLDB working with Swift on Linux (I know it was possible before, but nowhere near this easy to set up).
A big thanks to everybody who worked on this.
It's amazing to think how far Swift tooling has come over the last 12 months - first DocC, now this. It's nice. We're in a much better place.