The COVID-19 pandemic saw many businesses move their operations online. Also, the work-from-home shift necessitated companies to build the necessary web and mobile apps to boost employee productivity. Both these trends have given a significant impetus to software development, and Statista estimates that enterprises around the world will spend a whopping $506 billion in 2021 on software development. In turn, this robust software development growth needs the right developmental tools and environments to help developers create efficient applications quickly. One such development tool is Visual Studio Code.
What is it and how does it help in the software development lifecycle? Let’s find out!
What is Visual Studio Code?
Visual Studio Code is a source code editor for Windows, Linux, and macOS. Developed by Microsoft, this tool is 100 percent free for both personal and commercial use, so all that you have to do is download the tool, install it, and start writing your code!
It’s also lightweight and runs on most hardware and software configurations. All that Microsoft recommends is a 1.6GHz or faster processor and 1GB RAM. It also needs Microsoft .NET Framework 4.5.2 if you’re using Windows 7.
Another important aspect is that Visual Studio Code releases a new version with more features and bug fixes each month. Since most platforms support auto-updates, the latest versions are installed as soon as they become available. You can choose to disable these auto-updates if you’d prefer to update at your convenience.
Features of Visual Studio Code
Visual Studio Code comes with a host of features that make this tool easy to use and at the same time, make it powerful enough to help you build top-notch apps within a short time. Here’s a look at some of the important features of this tool.
- Works well across many operating systems such as Windows, Linux, and macOS.
- Supports hundreds of programming languages by providing syntax highlighting, bracket matching, snippets, and more for all the supported languages.
- Has intuitive keyboard shortcuts.
- Includes built-in support for code completion.
- Easy customization helps to navigate through your code easily.
- Supports code refactoring.
- Its interactive debugger allows you to quickly go through your code, check the variables, view stacks, execute specific blocks of text, and more.
- Integrates well with build and scripting tools to automate common tasks.
- Works well with Git, so you can use source control without leaving the editor.
- You can install a ton of third-party applications and it tends to work out-of-the-box, so you don’t have to worry about configurations.
- Allows you to customize or optimize the editor based on your personal preference.
- Since it’s open-source, you can also contribute to its development.
- Uses the Electron APIs to combine web technologies with native apps.
- Has a tools service architecture to integrate with Roslyn for .NET, Visual Studio debugging tool, and more.
- It is based on a public extensibility model to allow developers to build extensions, and customize the same.
- Has a portable version, so you can keep your data and settings intact, regardless of where you store it.
- Supports multiple cursors for fast edits, and you can also add secondary cursors with Alt + Click. You can also use Ctrl + Alt + Down, Ctrl + Alt + Up, or any other custom shortcut.
- You can turn on autosave if you wish.
- It remembers unsaved changes to files and stores them in the backup.
- Has advanced file and save options based on the matching case, whole words, and even regular expressions.
- Supports searching across files located in the opened folder.
As you can see, Visual Studio Code comes with a ton of features to help developers to create applications quickly.
So, how do we use this tool?
Getting started with Visual Studio Code
Getting started with Visual Studio Code is easy. First off, click on Windows, macOS, and Linux links to download it. Since this tool is a fairly small one, it downloads quickly and doesn’t clog your bandwidth.
Next, double-click the downloaded file, choose Run, and follow the wizard.
As for code extensions, choose from hundreds of them in the marketplace. Some of the toolchains that integrate well with Visual Studio Code are Yeoman, generator-aspnet, Express, Gulp, Mocha, Yarn, and more.
Customize the settings
With Visual Studio Code, you can customize every single aspect to meet your convenience. It provides two scopes — user settings and workspace settings.
User settings are customizations that apply to every Visual Studio Code instance you open from anywhere. In contrast, work settings are customizations of a particular workspace, and these apply only to the specific device where the workspace exists.
Also, these workspace settings are specific to a project and can be shared with others who work on the same project. These workspace settings override user settings always, so that’s something to keep in mind.
To view and customize these settings, go to File -> Preferences -> Settings on Windows and Linux and Code ->Preferences -> Settings on macOS. On the left-hand pane, you’ll see a list of commonly-used preferences, so click on each of them for further customization.
For specific settings, open the Setting Editor to search and discover the setting you want, and customize them as per your preferences. You can change language-specific settings as well.
Set the keyboard shortcuts
Once you have set up the user and work settings, consider setting the keyboard shortcuts. Though you can make these changes at any time, it’s recommended right at the time of setup to enhance your productivity later on.
Visual Studio Code comes with a keyboard shortcuts editor that lists all the commands and the associated keyboard shortcuts. You can always change or remove these key bindings to suit your preferences.
You can access this keyboard editor through File -> Preferences -> Keyboard Shortcuts in Windows and Linux and Code -> Preferences -> Keyboard Shortcuts on macOS.
Finally, let’s talk a bit about telemetry.
By default, Microsoft collects data about your use to improve its product. If you choose not to send updates to Microsoft, you can opt-out.
To do this, go to File -> Preferences -> Settings and search for “telemetry.” Uncheck the “Telemetry: Enable Telemetry.” This will stop Visual Studio Code from sending any further data to Microsoft, though it won’t delete the data that was already sent.
You can also change through the JSON editor. The code for this is:
Likewise, Visual Studio Code collects information about crashes, and to disable it, change the enable-crash-reporter setting to false. To do this:
- Open the command palette.
- Run the command: Preferences: Configure Runtime Arguments.
- This opens a JSON file called argv.json that contains all the runtime arguments.
- Search for “enable-crash-reporter,” and set this setting’s value to “false.”
- Restart Visual Studio Code.
With all this in place, you’re now all set to use the Visual Studio Code editor to program your applications.
What do you think of this editor? Do you use it already or plan to use it soon? Any aspects you like/dislike? Please share your thoughts in the comments section.