Test-Driving Visual Studio Code

Recently, I downloaded the new Visual Studio Code from Microsoft. You know, the company famous for software wonders such as SharePoint, Excel, and Internet Explorer 6. Well, they’re stepped into the Web IDE market with this new project, and they’re doing some surprising things with it. First, they’re making it available for free. Second, they’ve made versions for Mac and Linux, as well as Windows.Visual Studio Code logo

Wait, is this the same Microsoft we love to make fun of?

Visual Studio Code Features

Visual Studio Code supports modern applications using a number of languages. It primarily focuses on apps using with ASP.NET 5.0 and/or Node.js, but supports more than that. Not only can you write HTML, CSS, and JavaScript, but you can also implement more advanced web technologies such as Sass, Less, and JSON. I even stumbled upon a way to preview Markdown (*.md) code, which is handy when writing README files for documentation.

Visual Studio Code offers code editing tools that most Visual Studio users are familiar with, in a much sleeker package. VSCode provides JavaScript and other language helpers like syntax highlighting, bracket matching, and auto-indentation. It says it also allows you to add snippets in dozens of languages, but I haven’t had time to test that feature. Visual Studio 2013 started doing this right, but Visual Studio Code does it without waiting two minutes for the software to load.

One major time saving feature most Visual Studio versions provide is Intellisense, which offers coding suggestions while you type. Anybody who has tried to write JavaScript in older Visual Studio versions is probably rolling their eyes at this point. You see, in older Visual Studio versions, getting Intellisense advice on JavaScript code was like getting autocorrect suggestions from a drunk Siri. But VSCode supports TypeScript definition files (*.d.ts) downloadable from Github (https://github.com/borisyankov/DefinitelyTyped). Node.js, Angular, React, and even the ArcGIS JavaScript API in all its Dojo-y AMD glory are supported.

Playtesting and debugging has been a strong suit in the Visual Studio line, and Visual Studio Code is no exception. VSCode allows you to playtest Node.js and Mono apps. You can attach break points in your code, and hover to find values. You will need v. 0.12.0 or higher of Node to use break points. As a Node newbie, I appreciate any help I can get. Currently, however, Visual Studio Code doesn’t play and debug browser-based JavaScript applications.

Git

Source control absolutely essential to the work of a modern developer, and Git is the preferred version for most developers. Chances are, unless you’ve been coding FORTRAN with punch cards in a fallout shelter since the 60’s, you’ve heard of source control websites such as Github or Bitbucket. Cloud-based companies like these let you to check in and check out your code into both public and private repositories.

Visual Studio Code offers simplified git support out of the box (and I do mean simplified). If your project has already been “git init”-ed, the source control button in the upper left corner will tell you how many files have changes that need to be checked in. With the git interface, you can commit changes with comments, as well as push and pull content, and that’s basically it. You’ll need other software for handling your more advanced git needs, such as Git for Windows or Git Extensions.

My Verdict

Overall, I like Visual Studio Code as a JavaScript and web project IDE. JavaScript doesn’t feel like a second class citizen in this version. The TypeScript-backed Intellisense is solid, and makes me feel like I’m using professional software. Also, I like the VSCode’s simplicity. You’re not going to use it to embed WPF controls into older Winform desktop utilities. Microsoft knows it will be used for web and mobile apps, and it feels like they’ve made a nice, focused application.

I like Visual Studio Code’s minimalist Git interface. You can code, debug, commit changes, and code again without the distraction of other plugin interfaces jarring your concentration. They’ve made the Git icon almost as easy to use as the save button. Now you have no excuse not to commit.

Does it stand up well against Sublime Text, the champion of web IDE’s? I don’t know, since a used Mac Book Air is still out of my price range. But I’m willing to compare it to Notepad++, a popular text editor used by many Windows web developers. Notepad++ loads faster the first time (though with plugin updates, the times are more even). Visual Studio Code and Notepad++ both offer great features to help you code and debug, but VSCode’s Intellisense makes it win out.

What puts Visual Studio Code over the top for me isn’t file support or features, however. It’s the styling. I can code for 7-8 hours on VSCode without wanting to stab my eyes out. Notepad++ isn’t so pixel-perfect and easy on the eyes. Don’t worry, Notepad++, I’ll still use you on production servers when I only need to tweak config files.

So, if you’re a .NET developer and want to out of the cesspool of legacy code, give Visual Studio Code a try. It’s got the features you’re familiar with, a slimmer profile, and support for modern and cutting-edge tech. It’ll make you feel bad about telling Microsoft jokes… well, almost.


EDIT: I found out while researching this that Sublime Text offers a Windows version. Go figure. It’s not free, however, so I’ll pass for now.

One Response to “Test-Driving Visual Studio Code

  • Anonymous
    11 months ago

    Was wondering if you could elaborate one using VS Code with ArcGIS JavaScript API ? Does intellisense work only with TypeScript or dows it also enable Intellisense for plain old JS? Does Intellisense work for JS embedded in HTML?

Leave a Reply

Your email address will not be published.