Skip to content

Visual Studio and VS Code: Development Environment Setup

Hello everyone! As you know, the technology world is advancing at an incredibly rapid pace, and having the right tools to keep up with this tempo is essential. At this point, one of the most curious questions for beginners or those wanting to refresh their development environment arises: How to set up a development environment! Especially, choosing between popular options like Visual Studio and Visual Studio Code (VS Code) can sometimes be confusing, right?

Honestly, I have gone through this process myself. I remember spending days researching, wondering, “Which one will serve my purpose better?” You see, Visual Studio’s majestic interface calls out to you, while VS Code’s lightness and flexibility attract you. Anyway, in this article, I will talk about the installation of these two great tools, their main differences, and when one might be more advantageous than the other. I’ll add my personal experiences and try to have a conversational tone as if we’re sitting side by side. Hope it will be helpful 🙂

Now, let’s get to the core of the matter. What we call a development environment is actually our digital workshop where we write, edit, debug, and run our code. Just as a carpenter needs a good workbench, screwdriver, or sandpaper, programmers need code editors, compilers, and debuggers. Visual Studio and VS Code are powerful tools that fulfill these functions and offer much more.

Visual Studio: A Comprehensive Integrated Development Environment

Starting with Visual Studio. This is a robust and comprehensive IDE (Integrated Development Environment) developed by Microsoft. Especially if you develop on the Windows platform with languages like .NET, C#, C++, Visual Studio essentially acts as a suit of armor, preparing you against every challenge. It includes everything: code editor, debugger, designers, version control integrations, and more. The installation can take some time because it’s quite a large package due to its extensive features. But once installed, it feels like all your needs are gathered under a single roof.

One of Visual Studio’s biggest advantages is the ability to focus on specific development areas through “workloads” after installation. You can install only the modules related to web development, desktop development, game development (with Unity), etc., saving disk space. I find this approach very practical.

So, how do we start coding with this giant tool? It’s quite simple. When you open Visual Studio, a start screen appears. You can create a new project or open an existing one. Suppose you want to write a new C# console application. You click on “Create a new project,” select C# as the language, and “Console App” as the project type. That’s it! It gives you a clean code editor and a basic code template. Debugging is already integrated, so you can run your code and step through it when there’s a problem. This makes the learning process very easy for beginners, doesn’t it?

VS Code: Lightweight, Fast, and Flexible

Moving on to VS Code. This friend is a much lighter and faster code editor compared to Visual Studio. In fact, calling it an IDE might be misleading; it’s more like a “smart code editor.” Why? Because VS Code itself contains many features, but its real strength comes from extensions. You can install suitable extensions for whatever language or technology you’re working with, transforming VS Code into a fully functional IDE. Whether it’s Python, JavaScript, Go, Java, C++,… You can find an extension for almost everything. This makes it highly flexible.

Installing VS Code is also much faster and simpler than Visual Studio. It’s just a few megabytes download. After installation, you are greeted with a simple and clean interface. Unlike Visual Studio, it doesn’t have the “workload” option, but it has an extension marketplace, which is a paradise! You can select your favorite theme, customize keyboard shortcuts, and shape it entirely to your liking. This gives you a “My editor!” feeling.

Creating a project with VS Code is also very easy. Usually, you open a folder, and VS Code recognizes it as a project. Then, you use the integrated terminal to run commands. For example, if you want to start a Node.js project, you run `npm init -y` in the terminal to initialize it. Afterward, you can install necessary extensions like Python or ESLint for JavaScript, and start coding. Debugging is also provided through extensions, just like in Visual Studio, and sometimes I find VS Code’s debugging interface more practical.

When to Use Which?

Now, here’s the most critical question: Which one should you use? It really depends on what you’re trying to do and your personal preferences. Both have their own advantages. If you primarily work within the .NET ecosystem, such as C#, ASP.NET Core, Xamarin, Visual Studio’s integration and features will be very helpful. Especially for large and complex projects, Visual Studio’s solution and project management structures make more sense.

However, if you want a lightweight, fast, and flexible solution, frequently switch between different languages and technologies, or focus more on web development (frontend and backend), VS Code is a fantastic choice. I see many developers working with JavaScript, Python, Go, etc., preferring VS Code. I personally sometimes use VS Code for C# projects, especially for simple scripts or quick trials. The “install and start” philosophy of VS Code is very appealing.

Thanks to VS Code’s rich extension ecosystem, you can do almost everything Visual Studio can do. The only difference is that the setup and configuration process is more under your control. For example, for a C# project, you need to install the .NET SDK and the C# extension for VS Code. This is also a matter of personal habits. It’s like driving a car; once you get used to one, switching to the other takes some time, but both can be enjoyable in their own way.

Ultimately, both tools are among the best in their field. Whatever you choose for the beginning, you won’t be disappointed. The most important thing is to learn the tool you pick and create wonderful things with it. I use both actively, and they give me different joys in different scenarios. For example, I recently used Visual Studio’s debugger to verify each step in a .NET Core project with Dapper and PostgreSQL. But the same day, I could update and test my JavaScript code in a Vue.js project quickly with VS Code. Both served my purpose.

I hope I was able to clear some doubts in your mind about setting up a development environment. Remember, technology keeps evolving, and these tools are constantly updated. The best approach is to try both and discover which suits your workflow better through your own experience. Maybe, depending on the project, you’ll end up using both, just like me.

Now, let’s look at a simple code example. We will create a basic console application on both platforms to demonstrate how quickly they can get you started, even at a very basic level. Here it is:

// Visual Studio with C# Console Application Sample Code

// This code is the default template that appears when creating a new C# Console Application in Visual Studio. It simply prints a message to the screen.

using System;

namespace VS_Example_Console { class Program { static void Main(string[] args) { Console.WriteLine("Hello, welcome to the Visual Studio world!"); Console.WriteLine("This might be your first console application, isn't it wonderful? :)"); // Console.ReadKey(); // Can be used to prevent immediate closure. } } }

This code snippet is what automatically appears when you create a new C# console app in Visual Studio. It prints a simple message to the screen. Truly a very basic starting point.

Now let’s see how to do the same with VS Code. Here, the process is a bit more manual but still quite simple.

// VS Code with C# Console Application Sample Code

// To start a project in VS Code, first create a folder, then run 'dotnet new console' // in the terminal. This generates the Program.cs file.

using System;

namespace VSCode_Example_Console { class Program { static void Main(string[] args) { Console.WriteLine("Hello, welcome to the VS Code world!"); Console.WriteLine("This is your first message written with VS Code."); // Console.ReadKey(); } } }

As you can see, the codes are very similar. Both tools use the same .NET SDK, so the logic is the same. The only difference is that Visual Studio automates this process for you, while VS Code starts more under your control. Both tools have their unique advantages, but they both serve the same purpose. Even this simple process can boost your motivation, don’t you think?

If you want to learn more about installing and using these tools, you can visit the Visual Studio setup guide or VS Code setup guide. YouTube also offers many visual tutorials.

In conclusion, choosing a development environment is a personal journey. Use the one you feel more comfortable with and motivated to learn. Both have the potential to take you to great places.