Record Share & Video | Microsoft Visual Studio Code is so support for Docker

This article is a few people cloud "distributed architecture open source component election" Meetup record sharing. Share guests are from Microsoft cloud computing division of senior software development engineer Liu Peng.
Visual Studio Code is a development tool for Microsoft Open Source, which makes a lot of compilation and command support for Docker.

Today, we mainly tell you about Microsoft launched last year, a Visual Studio Code, and Visual Studio Code on the Docker some support. Welcome everyone to communicate with each other how to use Visual Studio Code in the local Docker related to the development and testing work.

Speaking from the author of VSCode

First want to ask you a question, your ideal development tool is a look like? Based on different technology stack, there are a variety of development tools, but for speed, performance, highlight, shortcut keys and other demands are the same. Some people want to develop tools like Optimus Prime as omnipotent, the speed does not require the installation of SSD or more memory can; but others are more concerned about the speed, requiring seconds to open a large number of documents; and perfectionism hope both fast Take up less resources but also beautiful appearance … …

1.jpg

Based on these ideas, Microsoft launched a Visual Studio Code last year, a cross-platform development tools. First introduce it to the author, this is the author last year to visit China when a friend to get the signature, this person is very confident, he is Erich Gamma.

Erich Gamma previously developed Junit, the equivalent of JAVA unit test of a library, and the leading research and development of Eclipse. Of course, the most famous or he and three other people, known as Gang of Four gang, wrote a very classic book "design pattern." In 2011 he joined Microsoft, engaged in IT development work.

Visual Studio family new member – VSCode positioning

2.jpg

Visual Studio Code positioning is to provide you with a new choice to cross-platform, mainly biased editor, so that users can enjoy the speed of the editor, but also enjoy the IDE to provide debugging convenience. It can support Linux, Mac platform, no longer limited to the Windows platform. In addition VSCode itself is an open source project, in GitHub we can see it on the source, compiled in the local.

3.jpg

Editor and IDE positioning is relatively different, editor more like that before the motorcycle, requiring less system share, better performance, faster, support a lot of language. The IDE, it has a powerful Debug analysis function, you can focus on some CI / CD integration, and language binding is more closely. VSCode positioning in the middle of this position, relatively bias IDE, both editor performance advantages, while integrating part of the IDE Debug function, more flexible, for Geek it is a keyboard centered IDE.

It is the main features: the first is free, ready to download such a development tool; the second is cross-platform, the core technology based on Electron; third is customizable, including UI, shortcut keys, many user behavior can be a simple The configuration file to do the configuration. VSCode design concept is the beginning of the speed. In addition it is open source, the development plan is very transparent, in GitHub can be seen next month released the main function and the next stage of the plan. In addition VSCode support scalable, we can write plug-ins in this, according to the demand to provide a richer function.

4.jpg

The original Visual Studio family is Visual Studio plus Team Service, and now added to the Visual Studio Code, so as to provide you from a editor to the IDE, to the background CI / CD a complete set of processes.

Rome is not built one day – the history of VSCode

5.jpg

2011, Erich Gamma joined Microsoft when there is a task to create a browser-based development environment, but to allow users to use when forgot to use the browser, they set up a research and development team in Switzerland, the past few years to do a lot Work, such as OneDrive to provide language code editing work, and TypeScript learning the site, write the right type on the left, the right will display the corresponding javaScript, you can also learn both languages, compare the similarities and differences between them.

6.jpg

They also as IE browser developer tool provides a lot of features, such as bing search results show similar to the development environment of the code. The most important thing is to provide a project called "Monaca" in Visual Studio Online, which really integrates the development environment into a browser environment. Now there are a lot of Visual Studio Code code based on Monaca code, which is its embryonic form, such as providing comparison, syntax highlighting, smart tips and other functions.

7.jpg

Standing on the shoulders of the giant – behind the technology of VSCode

8.jpg

Visual Studio Code is not done from scratch, Visual Studio Code is the first based on JavaScript, based on the Electron kernel, and then based on the Chrom kernel, plus node.js. At first, its language was JavaScript, and now it was 100% to switch to TypeScript.

9.jpg

Electron is GitHub launched for the node.js developers to provide a cross-platform desktop program framework, the core based on the Chrom kernel, VSCode team in 2014 to see it, decided to move the entire kernel to the above. Electron is similar to the desktop to achieve a small browser function, there will be a main thread, in each window there is a display of the process, each process will have a different Service, responsible for drawing different parts of the UI.

10.jpg

One of the more specific Service called Extension Host, which is responsible for plug-in, debugging services or some code check service to interact, all third-party plug-ins need to register inside the Extension Host, such as what time to activate the plug-in, and then what time and server To communicate. In the design of the time in particular the use of each plug-in independent of a process model.

Other IDE or editor to install a lot of plug-ins, the performance of a plug-in will destroy other plug-in performance, more and more plug-ins installed, open the file or when the operation of the entire editor will become more and more cards, but Through the Extension Host service registered all the plug-ins, each plug-in running in their own independent process inside, through the post message asynchronously interactive, so that a plug-in process out of the process will not affect the other process, thus ensuring the editor to open and The speed of the interactive user.

11.jpg

Now there are many plugins on the market, for different languages ​​or even different static code check tool, here is only part of it. Visual Studio Code in the official website has a very detailed tutorial, we can follow its tutorial to write a few simple, like word frequency calculation or simple language plug-in.

Video demo: Use the VSCode to remotely debug the Node js program in the Docker

Here to show you Visual Studio Code for Docker compiler or command support.

Https://v.qq.com/x/page/b0357vodyj9.html

    Heads up! This alert needs your attention, but it's not super important.