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 … …
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
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.
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.
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
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.
Standing on the shoulders of the giant – behind the technology of VSCode
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.
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.
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.