Review Visual Studio 2019

As a long time Ubuntu/KDE desktop user it’s hard for me to say but I’m very impressed with Visual Studio 2019 workload for Linux. VS for Linux workload allows you to edit and debug Linux apps on Windows while remotely executing on Linux. What awkwardly started as an add-on on VS 2017, has become a fully supported feature on VS2019.

Selecting Linux development with C++ workload in VS2019

Contrary to VS 2017 where Linux remoting was a major pain to configure, it took me not more than half an hour to download, install, configure VS 2019 and then checkout and compile a very large and complex high frequency trading project. Seamless and intuitive!
Start with no more tinkering with JSON configuration files, which is mandatory on VS Code. All configuration is handled by intuitive interfaces, located at intuitive places. All the options are there in front of you.

As an example, I will attempt to compile OpenCV, a popular vision/video processing package from Github. Go File/Clone Repository… and enter the OpenCV URL.

Cloning OpenCV repository within VS2019

CMake support is also included, supported and at the same level as QtCreator 6. CMakeCache.txt files are loaded after configuration and the key options are displayed so you can edit and modify them.

CMake configure starts right away after cloning – defaults to Win64

Remote server configuration is a breeze with password or public key authentication. No surprises there. Upon adding a remote there is an option to specify and download all headers for Intellisense. New header locations (/usr/include is default) can be added later.

For this example, I will configure my dedicated Linux server on the basement.

Multiple connections are easily configured with the remote connection manager
Remote headers can be fetched and cached locally for Intellisense!

After the remote is configured, we can tell VS2019 to use it as our default target. This is done right there from the toolbar.

Winx64 is the default mode but more can added in the toolbar, intuitively
Click the Add Configuration and choose many built-in options for Linux

The build configuration manager allow you to quickly switch from debug to release with a click, which has to be done manually in vscode.

The default remote is automatically configure so nothing to do once you add it.

Once you hit OK, rsync starts automatically to copy the entire project to the default remote location.

The rsync step which precedes the build used to be very slow and glitchy. It is now very fast and the whole build now finishes as fast as if you had hit make in the terminal.

Once rsync is done, the project is automatically reconfigured.

And voila, the entire OpenCV project is configured!
Hit Ctrl+Shit+B or Build/Build All and the project will start compiling

Hit Build/Install… and cmake install is called

And that’s it, OpenCV has been cloned, configured, compiled, linked and installed!

Intellisense is way easier to configure and it is seamless since the remote headers are copied and cached locally.

Intellisense understood all the libstc++ headers (no squiggles)

The integration with clang tools is still much better on QtCreator 6 but it is also there as a feature.

The most powerful feature though is of course the debugger which is unanimously known as the best debugger in the market. The Visual Studio debug interface is the cleanest and most intuitive out there. Remote debugging works flawlessly and it looks like you are debugging a local windows executable.

Debugging a remote Linux binary is as seamless as debugging a local Win64 application

Visual Studio 2019 in my opinion is only surpassed by a native Linux desktop where eMacs+terminal allows fast turnaround and complete control.

But it has, again in my opinion, far surpassed VsCode and cLion for remote development.