Visual Studio vs. Visual Studio Code: How to Choose

For decades, when I arrived at work in the morning, I would launch Microsoft Visual Studio (or one of its predecessors, such as Visual C++ or Visual InterDev), then brew tea and possibly attend a morning meeting while it started. laborious. . I would keep the IDE open all day while I went through dev/test/debug cycles to avoid another boot delay. When I worked on a C++ project with about 2 million lines of code, I also kicked off each day’s work by automatically running a batch script that did a code check and a full rebuild of the product in the early hours of the morning.

By the way, Visual Studio’s startup overhead has dropped significantly over the years. This is no longer an issue, even in huge Visual Studio 2022 projects.

Meanwhile, Visual Studio Code usually starts up fast enough that I can be productive in minutes, even for large projects. I said usually, not always: Visual Studio Code itself needs a monthly update, and the many extensions I’ve installed often need their own updates. Yet even updating a dozen extensions in Visual Studio Code takes far less time than Visual Studio took to rebuild the symbol tables of a large C++ project.

Still, choosing between Visual Studio Code and Visual Studio isn’t as easy as choosing between a lightweight editor and a heavyweight IDE. While Visual Studio Code is highly configurable, Visual Studio is very comprehensive. Your choice may depend as much on your working style as it does on the language support and features you need. Let’s take a look at the capabilities and trade-offs of these two development tools.

What is Visual Studio Code?

Visual Studio Code is a lightweight yet powerful source code editor that runs on your desktop and is available for Windows, macOS, and Linux. It comes with built-in support for JavaScript, TypeScript, and Node.js and has a rich ecosystem of extensions for other languages ​​(such as C++, C#, Java, Python, PHP, and Go) and runtimes (such than .NET and Unity).

Along with the idea of ​​being lightweight and getting started quickly, VS Code has IntelliSense code completion for imported variables, methods, and modules. graphical debugging; fluff, multi-cursor editing, parameter hints and other powerful editing features; elegant code navigation and refactoring; and integrated source control, including Git support. Much of this was adapted from Visual Studio technology.

VS Code itself is built using the Electron shell, Node.js, TypeScript, and Language Server protocol, and is updated monthly. Extensions are updated as often as needed. The richness of support varies across different programming languages ​​and their extensions, ranging from simple syntax highlighting and square bracket matching to debugging and refactoring. You can add basic support for your preferred language via TextMate colorizers if no language server is available.

The code in the VS Code repository is open source under the MIT license. The VS Code product itself comes under a standard Microsoft product license, as it contains a small percentage of Microsoft-specific customizations. It’s free despite the commercial license.

visual studio code screenshot IDG

Visual Studio Code showing the source code for itself. Note the posts (created using information from the Git repository) showing function authors and most recent modification dates. Also note the “peek” popup for trackSelection() in the middle of the screen.

What is Visual Studio?

Visual Studio (current version Visual Studio 2022, which is 64-bit) is Microsoft’s premier IDE for Windows and macOS. With Visual Studio, you can develop, analyze, debug, test, collaborate, and deploy your software.

On Windows, Visual Studio 2022 has 17 workloads, which are consistent tool and component installation sets for different development targets. Workloads are a significant improvement to the Visual Studio installation process, as a full download and installation of Visual Studio 2022 can easily take hours and fill up a disk, especially an SSD.

visual studio workloads IDG

Visual Studio 2022 supports 17 different workloads, representing different development targets.

Visual Studio 2022 for Mac has a less complicated installer than the Windows version, mainly because it doesn’t support as many targets. It lets you develop for web, mobile, and desktop with .NET, with Unity, Azure, and Docker support included by default. .NET Core, Android, iOS, and macOS targets are optional; the last three use Xamarin.

visual studio installer for mac IDG

Visual Studio installer for Mac. Note that there are only four optional targets, compared to the 17 workloads offered in Visual Studio for Windows.

Visual Studio 2022 is available in three SKUs: Community (free, not supported for enterprise use), Professional ($1,199 first year/$799 renewal), and Enterprise ($5,999 first year/2,569 $ renewal). The Enterprise edition offers features for architects, advanced debugging, and testing that the other two SKUs lack.

visual studio 2022 screenshot IDG

Visual Studio 2022 editing UI. Note the menu items for testing and analysis, functions not found in VS Code.

Visual Studio or Visual Studio Code?

You would think that choosing between Visual Studio and Visual Studio Code for a given software development task would be as easy as choosing between an IDE and an editor. It’s not, mainly because VS Code can be configured to be quite close to an IDE for many programming languages. However, this configurability comes with a number of tradeoffs.

For example, if your development style is test-driven, Visual Studio will work right away. On the other hand, there are over 15 test-driven development (TDD) extensions for VS Code supporting Node.js, Go, .NET, and PHP. Similarly, Visual Studio does a good job with databases, especially Microsoft SQL Server and its relatives, but VS Code has plenty of database extensions. Visual Studio has excellent refactoring support, but Visual Studio Code implements basic refactoring operations for half a dozen languages.

There are a few clear cases that favor one IDE over the other. For example, if you’re a software architect and have access to Visual Studio Enterprise, you’ll want to use it for architecture diagrams. If you need to collaborate with team members on development or debugging, Visual Studio is the best choice. If you need to do serious code analysis or performance profiling, or debug from a snapshot, Visual Studio Enterprise will help.

VS Code tends to be popular in the data science community. Nevertheless, Visual Studio has a data science workload that offers many features.

Visual Studio does not run on Linux; VS Code does. On the other hand, Visual Studio for Windows has a Linux/C++ workload and Azure support.

For day-to-day development/testing/debugging cycles in the programming languages ​​supported by both Visual Studio and VS Code, the tool you choose really comes down to personal preference. If you tend to work on a development project for hours at a time, then Visual Studio might be better suited. If you tend to dive into development for brief periods and alternate between other tasks, then Visual Studio Code might make you happier.

Copyright © 2022 IDG Communications, Inc.

Comments are closed.