VS Code for SFOS app development

More of a curiosity thing than an actual plan to develop anything (since i cant) but here goes.

Can you use VS code to develop SFOS apps and if yes how you set up something like that. What extensions you need etc.

1 Like

VS as in Visual Studio?

Yes; but it is based on Atom which they got with the GitHub purchase, and actually pretty good.

Visual Studio Code is not based on Atom and VSCode vastly predates Microsoft’s GitHub purchase by 8 years.

Hmm, seems i was mistaken. I guess that explains why a few problems fixed in Atom are still in VS Code. The look-and-feel is really similar though.

But i must correct you back; it’s 3 years (2015 vs 2018).

1 Like

You’re right about the acquisition. Microsoft News hub shows 2023 (which did seem way too recent but I didn’t question it :smiley: )

1 Like

Visual Studio code, at least running on linux, is so painfully slow. I think it’s one of those, ‘works well on gaming boxes’ development tools. Like eclipse. It’s not really my style anyway but some people do swear by it. It could certainly be setup, but I think that’s a major project in and of itself.

Why do you ask?

You can, but it will not be the same experience as in Qt Creator.

For basic Qt/qml support you can use the experimental extension from Qt, at the time I was installing it was not available in the extension stores and I built it from sources. It will require qml language server which is not available in Sailfish IDE, but you can use one from official Qt SDK or PySide/PyQt. This language server will not work with Sailfish-specefic qml objects/modules, but it can be partially fixed by copying files from a SDK target to PySide/PyQt/official Qt SDK directory.

For C++ you can probably use official MS extensions. I don’t develop C++ apps right now and haven’t tested this. I believe the same approach with copying files like with Qml might work.

Not really related to Sailfish development, but for Pyotherside-based apps where Python language support is needed, in VSCodium/code-oss (VSCode without Microsoft telemetry) official MS pylance extension will not fully work. As an alternative I can recommend BasedPyright.

For building, deploying, etc. you can use Sailfish official sdk cli.

Wanted to share my own experience and setup. I develop my Pyotherside-based apps with a combination of Qt Creator and VSCodium (same as VSCode but without Microsoft telemetry). For Python I use VSCodium and BasedPyright extension. For qt and qml I use Qt Creator. I tried to setup everything to work with VSCodium, and I listed everything I did above, but at the end I sticked to using Qt Creator for this. For trantranslating, spec files I use VScode.

1 Like

I am using VS Code for professional and hoby C++ coding, Python coding, Markdown documents, bash scripting, CSV files manipulation, etc, except for Qt/Qml projects, where Qt Creator is more helpful IDE. Also, I use full Visual Studio if I want to create Windows msi packages. VS Code is excelent IDE, there exist an extension for everything, probably also for Qt and msi packaging, but I did not discover it. VS code is especially suitable if you have Win computer and using Linux through WSL2.

2 Likes