Scott Hanselman

Introducing Visual Studio Code for Windows, Mac, and Linux

April 30, 2015 Comment on this post [85] Posted in ASP.NET | VS2015
Sponsored By
Screen Shot 2015-04-28 at 11.33.49 PM

What a wonderful time to be developer. I'm down here at the BUILD Conference in San Francisco and Microsoft has just launched Visual Studio Code - a code-optimized editor for Windows, Mac, and Linux and a new member of the Visual Studio Family.

Visual Studio Code (I call it VSCode, myself) is a new free developer tool. It's a code editor, but a very smart one. It's cross-platform, built with TypeScript and Electron, and runs on Windows, Mac, and Linux.

Visual Studio Code has syntax highlighting for dozens of languages, the usual suspects like CoffeeScript, Python, Ruby, Jade, Clojure, Java, C++, R, Go, makefiles, shell scripts, PowerShell, bat, xml, you get the idea. It has more than just autocomplete (everyone has that, eh?) it has real IntelliSense. It also as IntelliSense for single files like HTML, CSS, LESS, SASS, and Markdown. There's a huge array of languages that Visual Studio Code supports.

IMHO, the real power of this editor is its project IntelliSense for C#, TypeScript, JavaScript/node, JSON, etc. For example, when an ASP.NET 5 application is being edited in Visual Studio Code, the IntelliSense is provided by the open source projects Roslyn and OmniSharp. This means you get actual intelligent refactoring, navigation, and lots more. Visual Studio Code's support for TypeScript is amazing because it has JavaScript and TypeScript at its heart.

Visual Studio Code has git support, diffs, interesting extensibility models through gulp, and is is a great debugger for JavaScript and Nodejs apps. They are also working on debugging support for things like the .NET Core CLR and Mono on all platforms.

This a code-focused and code-optimized lightweight tool, not a complete IDE. There's no File | New Project or visual designers. If you live and work in the command line, you'll want to check free tool out.

You can download Visual Studio Code now at http://code.visualstudio.com.

They'll be blogging at http://blogs.msdn.com/b/vscode and you can email them feedback at vscodefeedback@microsoft.com and follow them at @code.

Download Visual Studio Code and check the the docs to get started. Also note the docs for ASP.NET support and Node.js support. Visual Studio Code is a preview today, but it's going to move FAST. It automatically updates and will be updating in weeks, not months.

And here's some screenshots of Visual Studio Code because it's awesome. Code what you like, how you like, on what you like, and you can run it all (by the way) in Azure. ;)

Screen Shot 2015-04-28 at 11.17.59 PM

Screen Shot 2015-04-28 at 11.28.35 PM

 
image

Have fun!


Sponsor: Big thanks to the folks over at Grape City for sponsoring the feed this week. GrapeCity provides amazing development tools to enhance and extend application functionality. Whether it is .NET, HTML5/JavaScript, Reporting or Spreadsheets, they’ve got you covered. Download your free trial of ComponentOne Studio, ActiveReports, Spread and Wijmo.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
April 30, 2015 0:57
Nice to see the blog post published live!
April 30, 2015 0:59
Thanks much for the post, keep em comming
April 30, 2015 1:02
How long did you had this one in holster? ;)
April 30, 2015 1:04
Sorry, you just went on stage. Got to go :)
April 30, 2015 1:20
Glad to see that it is available on Mac and Linux. I'm guessing that there is a rich plugin system, something like Sublime.
April 30, 2015 1:22
Tools seems great.
However, since my name is Göran (am from Sweden) my name is in the path as I had a solution on my Desktop. When using the 'Error and Warning' function the program will find things but can't open the file containing the problem, it can't find the file, and it's my swedish name that's causing the problem. Moved my solution to another drive (without swedish characters in the path) and then it works. This is not the first time programs has this problem (hey, it's 2015....)
April 30, 2015 1:29
This is a nice, lightweight option. Will Code be embeddable in other apps?

Thanks,
-Scott
April 30, 2015 1:41
I moved to OSX last year and have been coding with Sublime. VS is great ... if that's what you want but if you don't then you've struggled for tooling if you want to code using .NET. I'm someone who is very happy using the command line and just wants a decent lightweight editor - this fits perfectly.
April 30, 2015 1:41
Scott,

This is one of the best surprises to come out of Microsoft for the Mac community in a long time. I'm looking forward to giving it a go.

Thanks,
Rob
April 30, 2015 1:47
This is exciting!
April 30, 2015 1:53
While I will probably continue to mainly work with full Visual Studio, this is certainly going to replace NotePad++ ;-)

It seems to be based on Atom..?

April 30, 2015 2:14
BUILD? The conference from now on should be called BOLD.
njy
April 30, 2015 2:47
Thanks Scott for sharing, I was waiting for this link from the announcement :)
April 30, 2015 2:55
Does it support React?
April 30, 2015 4:39
Is debugging for ASP.NET Web Applications supported on Windows? I can't seem to get it working. A launch.json file is generated for my project with a lot of pre-configuration for node.

The website says "Visual Studio Code and ASP.NET 5 are in preview and at this time debugging is not supported on OS X and Linux. Rest assured, we are working hard to bring these experiences to you in the near future." so I would assume it should be working on Windows, right?
April 30, 2015 4:51
I can't seem to get intellisense working for C#. It works fine for HTML etc (where I get all the bells and whistles like zen coding) but for C# I can't seem to get much more than syntax highlighting :|

@David

It uses Electron for the UI but I suspect the rest of it is mostly unrelated to Atom.
April 30, 2015 5:17
@Lachlan Picking - I think you only get C# intellisense if you have a folder with project.json in it. Individual C# files won't give intellisense.
April 30, 2015 6:11
Hands down, MS builds the best Dev tools in the industry. Not something I'd probably ever use. I'm swamped with C#
April 30, 2015 6:52
Thank you Scott for sharing. This is very exciting.
April 30, 2015 7:08
Does VSCode support plugins? Some projects I work on use Hg instead of Git, so if support can be provided by a plugin then great.
April 30, 2015 7:42
Has anyone got it installed on linux? When I try to unzip it an error comes!"An error occurred while extracting files". I redownloaded and checked again, but the problem persists.
April 30, 2015 7:53
@ John, I got that error if used the GUI to extract the files, but from commandline it worked "unzip zipfile.zip -d outputFolder".

I'm playing with the settings and tried {"javascript.validate.target":"ES6"} (since I'm using babeljs.io) but still getting validation errors with modules. Also does anyone know how to get .jshintrc respected I'm getting variable undefined even though I've set prefdef.
April 30, 2015 8:44
Looks really nice. Will it be open sourced? This could be the killer app for TypeScript (especially if devs could look at the source to learn from it.)
Ben
April 30, 2015 8:48
Great work, Microsoft! This probably will be my Sublime Text replacement. :-)

@Scott, is box selection supported? I couldn't use alt key and box select text. Am I missing something here?

April 30, 2015 10:09
I'm working on a Mac and write my code in Xamarin Studio. Is it possible to write my code in VSCode? I can't see any hint of compiling?

Does it work with the Mono-Compiler? Or is it just an editor like Sublime?
April 30, 2015 10:09
Thankx Scott for the News . Now we cant say VS is only limited to Microsoft Only
April 30, 2015 10:10
It's not online anymore?
Chrome reports:
This webpage is not available

DNS_PROBE_FINISHED_NXDOMAIN
April 30, 2015 10:28
I emailed my first question to vscodefeedback@microsoft.com but the message was rejected by their email system. So I will post the same question here in the hopes that someone can answer.

Just learned about VSCode, which I was excited to install since I am a Mac user.

I have a TypeScript file in the VSCode editor, which I can compile successfully using the command line tsc to produce JavaScript.

How can I compile it in VSCode?

Doing shift command B does not seem to generate updated JavaScript to correspond to the updated TypeScript.

I don't see any "build" on the menu bar or anything else that would tell me how to compile the TypeScript.

What am I missing?

April 30, 2015 10:30
@Daniel

Had the same problem. https://www.visualstudio.com/products/code-vs works.
April 30, 2015 10:36
Thanks but the link is broken.
http://code.visualstudio.com/ returns DNS_PROBE_FINISHED_NXDOMAIN
April 30, 2015 10:41
Hi Scott. Thanks for the post. I wonder if the Ruby language support is an ongoing process because the link you have mentioned does not express anything related with Ruby language support.
April 30, 2015 10:57
I need help understanding how this relates to VSVanilla and VSExpress...
April 30, 2015 11:03
Heya Scott,

When you mention "If you live and work in the command line, you'll want to check free tool out.", are you saying the editor should be able to be launched from the command line also?

I installed it on my Mac (by doing the usual drag to Application folder) and looked under the hook to see if it featured a command line binary I could link to my bin folder and to my surprise I learned it was actually Atom under there :D

When lanching from my terminal here I get a stack trace with a message saying:


2015-04-30 02:52:45.836 code[51562:37762001] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not automatically determine the current application's identifier'
April 30, 2015 11:15
Just in case anyone installs it - don't be alarmed by a new explorer context menu entry called "Ticino". It's Code, offering to open the file or folder for coding. The installer has a bug though, this entry does not uninstall with Code. A little scary, but you can still tamper with the registry and remove the entries yourself. ;)
April 30, 2015 11:25
It seems to be down since yesterday :( - http://downforeveryoneorjustme.com/http://code.visualstudio.com
April 30, 2015 11:51
Nice Qt Creator clone :)
April 30, 2015 11:52
site is down ...

anyone who wants the download links
win64
http://download.microsoft.com/download/0/D/5/0D57186C-834B-463A-AECB-BC55A8E466AE/VSCodeSetup.exe
linux
http://download.microsoft.com/download/0/D/5/0D57186C-834B-463A-AECB-BC55A8E466AE/VSCode-linux-x64.zip
osx
http://download.microsoft.com/download/0/D/5/0D57186C-834B-463A-AECB-BC55A8E466AE/VSCode-osx.zip
April 30, 2015 12:23
Site is now here https://www.visualstudio.com/products/code-vs
Obi
April 30, 2015 12:53
Acual site (the one with a working download button) just came back up a few seconds ago! (Yes, I was pressing refresh every few seconds, I'm not proud of this.)

https://code.visualstudio.com/
April 30, 2015 13:18
I'd be interested to know if this would run from a USB key - I tend to find myself at machines that don't have dev tools and don't have the power to run a full IDE.
Joe
April 30, 2015 13:40
I haven't installed it yet, but it looks very nice and promising.
April 30, 2015 14:35
Thanks Scott. :)

Bad news for Microsoft Haters !!!

Hey Microsoft haters, please get a life. :)
April 30, 2015 16:09
Once this supports extensability so the community can add new language support, this will be my new go-to editor.
April 30, 2015 17:41
Really nice! I would like to use this as an code editor for Unity3d...sadly it doesn't seem like thats working at the moment. At least I can't make it work.

But it seems very cool, have a nice feeling to it, like this new "lite" feeling, with fast startup, silent updates etc.
April 30, 2015 17:44
@Jörg. It works with the mono-compiler. Just add a task for build. See the explanation here: http://blog.denouter.net/2015/04/compile-visual-studio-solution-in.html
April 30, 2015 18:22
This is awesome news! My mind is blown. Looking forward to being able to build cross platform asp.net 5 apps using cross platform lighter weight tools. Super kudos to everyone involved!
April 30, 2015 18:49
Agreed, this is very cool. Exciting to see Microsoft move in these directions, and glad that non-Windows users will get a taste of Visual Studio.
April 30, 2015 19:29
This was definitely the wow! moment yesterday, but I wish this was named a bit different.
I can only imagine having an issue with the new IDE and googling for "Visual Studio Code XYZ not working" and being lost in the tons of Visual Studio 'code' that google will match for it.
April 30, 2015 19:31
Definitely awesome and nice to see Microsoft moving further toward supporting development on other than Windows platforms. And I definitely like the look of VSCode so far. A bit 'atom shellish' - but that's ok IMHO.

I do think it unfortunate that the tutorial accompanying the announcement - creating an ASP.Net 5 app on the Mac - does not work as-is. When trying to follow that example, I get repeated exceptions when running the web app via kestrel and trying to view the page on localhost:5001.

Turns out to be a well-known issue on Macs with Mono.

http://www.mono-project.com/docs/about-mono/releases/3.12.0/

I was able to get round the problem by setting:

export MONO_MANAGED_WATCHER=false

And then it ran just fine. My point, if i have one, is that the first run for a new tool on a new platform, for MSFT, should not be failing due to a pre-existing and well known issue. At least not without clear guidance on the VSCode site to that effect.

Although I'm a Mac developer, I consider myself open to Microsoft tech. I would think I could be forgiven for just giving up on this great looking new tool if it fails straight out of the chute like this for me.

I'm not hating on Microsoft. I want to see it succeed with efforts like this because it means more choices and more awesomeness for all of us.
April 30, 2015 19:31
I didn't get to see the announcement since I was stuck in a meeting and a crazy day yesterday. Cool thing to wake up to though. As other people mentioned, it feels a bit like Atom (and I know you guys are at least using some of the same libraries). I almost feel like I would have liked you two to join forces. Basically an effort like Omnisharp on steroids... Anyway, still looking for something to supplant Notepad++ on Windows and Sublime on Linux so will give this a shot but without the plugin system being implemented yet, it's a hard switch to make for me.
April 30, 2015 20:43
I just tried the editor, and as someone already mention, the Intellisense doesn't work for existing C# projects (nor go to symbol, go to definition, etc.). I think it looks nice and is a good starting point, but as of now (and without any plugins) it's not even remotely comparable to vim or sublime. I'm .NET developer (who works most of the time on windows) but I rarely use VS these days. Vi is cross platform, lightweight and has a whole bunch of plugins that allows you to do almost anything you need. The only feature I really miss is "smart refactors" and I guess VSCode could outclass VI in this matter. But that would take some time...

I'm really excited about VS on Mac an Linux (and MSFT open sourcing everything) but I guess we have to wait to have a real contender for Vi outside Windows...

Keep up the hard work! It's amazing what devdiv has accomplished in the past few years. Keep'n rockin'
April 30, 2015 21:53
I'm not a .Net dev or VS user (my dev work is in python & javascript on a mac) but this whole .net on mac & linux is pretty surprising.

One thing I'm trying to figure out - can .net projects that build to .exes (or 'desktop apps' in VisualStudio be built with the mac port of .net & VSCode (and more importantly runnable on macs), or is it limited to web apps at this point?
April 30, 2015 22:03
@ Peter Hanley

It's been possible to build desktop apps for *nix based systems for over 10 years :-)
April 30, 2015 22:23
Any chance this will be the "Xamarin Killer"? Could I eventually be able to create iOS apps in VSCode on a Mac without the hideous licensing costs Xamarin has?
April 30, 2015 22:46
I like that there's a move to support those of us who "live and work in the command line". The next thing we command-line guys need in VSCode is a C# REPL. :)
April 30, 2015 23:31
Yes! It is actually possible to use as editor for Unity3d - just found out how and did a blogpost about it: http://laumania.net/2015/04/30/how-to-use-visual-studio-code-as-unity3d-script-editor/

Hooe this helps somebody out there.
April 30, 2015 23:58
@Matthew Blott

re: "It's been possible to build desktop apps for *nix based systems for over 10 years :-)"

Using the tools that just got released yesterday?
May 01, 2015 1:27
I will love to have Web Essentials and easy deployment (such as FTP and WebDeploy) inside Visual Studio Code! That will be amazing!!!
May 01, 2015 1:48
@ Peter Hanley

No, but there wasn't any need for the sarcasm. It wasn't clear from your initial question that's what you were asking, it seemed like you just wanted to know if you could build executables on non Windows platforms.
May 01, 2015 12:15
Nice Article. Finally Something for Mac.Better than Xamarin as they Lack some Visual Studio Feature.

May 01, 2015 17:11
Does anyone have any suggestions to point me in the right direction on customizing IntelliSense in VSCode? I've briefly searched on customizing Roslyn or OmniSharp and scanned through their GitHub readmes and nothing immediately pops out at me. My goal is to switch to VSCode for my script/text editing and it would be awesome to customize IntelliSense for text editing.
May 02, 2015 2:24
Looks like someone was showing restraint when you alluded to this at .Net Fringe. This is fantastic as someone who has always wanted better tooling for ASP.Net on Mono!
May 02, 2015 17:07
Great news! I just downloaded the preview and fiddled with it a bit.
I'm working on a .NET + React (Babel, ES6) project right now. The tooling for that kind of combo isn't there yet is it?
Looking forward to the development of this! Would be so nice to be able to use a lightweight environment for both .NET and ES6 + React (JSX) projects.
But I'm sticking with Sublime for now, I have Babel and auto formatting etc. working for that editor.
May 02, 2015 19:11
I've used VSCode for two days now working on a TypeScript project, and I must say I like it. It's a beautiful editor with good look and feel. Everything is snappy, including IntelliSense. Well done!
May 03, 2015 1:56

Got started today with VSCode on OSX. Had a bit of a challenge to get things going. This helped me get started quite well:
http://www.itworld.com/article/2917266/development/how-to-install-and-use-visual-studio-code-and-aspnet-5-on-mac-os-x.html

Other things I needed to address were getting bower and grunt setup properly >> remember sudo makes all the difference. B.t.w. the bash (pro)file is not called .bashrc but .profile and you need to restart the shell to get your exported settings functional. http://coolestguidesontheplanet.com/install-gruntjs-osx-10-9-mavericks/

After that setup http://yeoman.io/ and in an instant had my first aspnetv5 project up+runnig with use of the generators. #Awesome





May 03, 2015 8:41
Why should one use this, instead of Visual Studio Community Edition?
May 03, 2015 12:16
Hi Scott,
I've just tried VSCode today on a Mac, yes it looks very promised.
But I see that Intellisense does not work at all, for example when I try it with a node js project, enter "http" and then "." it does not show any suggestion (for that I expect it at least show "createServer").

Checked carefully but I have no idea the reason.

Can you please help me ? Really need it to speed up my productivity on my node js project.
May 03, 2015 14:49
Looks very nice!!!!!
May 03, 2015 22:35
Sweet! I'm off to see what kind of refactorings are supported in some of my larger Python projects.
May 03, 2015 23:54
Whoops. It's mostly oriented towards C#, Typescript and node. That totally makes sense. Sorry about the non-sequitur. I did download it and check it out on Linux. It's a simple but very functional and attractive code editor.
May 04, 2015 2:35
Thanks for Sharing... Awesome.....
May 04, 2015 13:03
@Kyle Visual Studio Code: Preview currently supports mono debugging on Linux and Mac and Node debugging on Windows, Linux and Mac.
Debugging ASP.NET 5 is planned for the future.
May 04, 2015 16:05
Seems ES6 is not yet supported by the JavaScript language service in VSCode. It's very confusing that it currently says "Don't use Typescript constructs!" when using `const. Is there a way to disable this warnings.
May 04, 2015 22:41
Nice -- but will it be open sourced?
Free only during the preview phase?
What about es6 support?
Will work like sublime-typescript now be dropped again? :(
igl
May 05, 2015 14:25
It seems Code does not correctly pass FILE_SHARE_### flags so open files are blocked.
May 05, 2015 17:46
Anyone else having trouble installing on Windows 7? I got it working easily on my Mac at home, but my work PC bombs with "Installation has failed -- Failed to extract installer". When I click "Open setup log", nothing happens.

May 06, 2015 4:31
Scott,
I love your talks and posts.

Here is a small blog post on how to debug C# code on Mac OSX in VSCode.

https://isimplecoder.github.io/2015/05/04/debugc%23/

Thanks Microsoft for giving this wonderful editor.

May 06, 2015 5:37
when I invoke the Code executable from the terminal I get :
No command 'Code' found, did you mean:....

If I'm running on ubuntu 32bit, does this file work VSCode-linux-x64.zip? shouldnt be something like VSCode-linux-x86.zip ?
I couldn't find a 32 bit flavor..
May 08, 2015 10:47
This is what i did to launch my Visual Studio app via command line.

sudo ln -s ‘/Applications/Visual\ Studio\ Code.app/Contents/MacOS/Atom’ /usr/local/bin/vscode

This is working, when i try to run the vscode from command line it´works properly except when i want to launch the app passing to it a directory path (e.j from current directory i use the following command: 'vscode .'. If I do this I get the same error as Roberto Andrade.

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not automatically determine the current application's identifier'

does anyone know how to fix it??
May 09, 2015 11:02
Guys,
to run Visual Studio Code from terminal just create small shell script instead of link:

#!/bin/bash

open -a /Applications/Visual\ Studio\ Code.app "$@"
May 13, 2015 6:23
Pretty impressive preview :)

I have used it more so for front end coding and it is pretty sweet. I love that it is the same across linux, mac and windows.

The command palette implementation is great too - I like the ":n" for a line or just "@symbol" etc - very slick! The git view is good too.

Nice work!
May 14, 2015 22:24
after downloading the 64 bit version of it , I could run it on 32 bit Lubuntu by executing the steps listed here: http://askubuntu.com/questions/616797/can-i-install-visual-studio-code-on-ubuntu-32-bit

Carlos G.
May 19, 2015 10:05
Good tool for university lectures !
June 02, 2015 20:26
I agree, great time to be a developer and this is exactly what I was after for both Linux and my Windows 8.1 notebook alongside Visual Studio 2013 Community Edition.

I can't wait to see the evolution, hopefully something full blown on Linux or maybe take a leaf out of streamed gaming, streamed visual studio IDE! (I want 3% of the rights for that idea lol).
July 24, 2015 18:16
I am ready to switch from webstorm to Visual Studio Code but there are many features missing. Will wait to see if Visual Studio Code will get Local History support, . . .

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.