Visual Studio Code

Source: Internet
Author: User


Introduced


vscThe promotional language is:


A cross-Mac OS Xplatform source editor that runs on,WindowsandLinuxabove, for writing modernWeband cloud applications.


As it says, it'svscespecially good for the front-end development editor.



Built-inhtmldevelopment artifactemmet(zencoding), withcssits related compiled languageLessandSasshas a good support.



Of course, the best thing to do is write thejscode, which is the feature I'll focus on next.


Smart Tips


Because before Microsoft launched the Typescript language, the combination oftsdfiles, withvisual studiowritingtypescriptcode is quite cool, smart hints function very muchnb.



This function is rightfullyvscinherited.



At present, the main front-end Class library/framework, includingnode.jsits modules/frameworks have correspondingtsdfiles, you can go to definitelytyped to find.



By introducing the corresponding files in the project, you can have smart hints.



Hereangular, for example, use the following steps:


    1. The global installationtsdis through thetsdinstallation.d.tsfile. This will generate a directory under the project.typings, the directory below is the download.d.tsfile, and then write the code when there will be smart hints. For specific usage, refer to TSD usage.
 
npm install -g tsd

tsd query angular --action install
    1. If you do not want to introduce yourself, you can alsoangularpress behind the variablectrl+k, there will be a light bulb picture, click the light bulb picture will have the corresponding prompt, choose to download thexx.d.tsfile on it, the editor will download the corresponding file in the.typingsdirectory.


Process such as:






Here's another onenode.js:






Talk about Smart tips, and then code debugging.


Debug node


Previously written aboutnode.jsdebugging scenarios (node. js debugging) that were described in the article.vscI've been using it to write code since the release, and it's used to debug thenode.jscode.



The use of the method is also very simple, the steps are as follows:


    1. Open the file you want to debug, pressf5, and the editor will generate alaunch.json
    2. Modify thelaunch.jsonrelevant content, mainlynameand theprogramfield, and change it to your project corresponding to the
    3. Click the button on the left of the editor that looks like a spider.
    4. Click the button at the top left cornerDEBUGto start debugging
    5. Break the dots and debug.


Process such as:



Finally, one more egg.


Node API View


When writingnode.jscode, sometimes forget the methods and their usage in a module, often go to the official website to double theapidocument.



Here's how to usevscit to fix the problem.


    1. Open thevscconsole (Help > Toggle Developer Tools > Console)
    2. Write code in the console, querying the module method.


Process such as:



vscIt isatom-shellwritten with (now called electron), this thing andnode-webkit(now called nw.js), is thenode.jschrometool that combines and combine, so can use.



Howevervsc, there arenode.jsnot many modules to use, such as referencesutilandvmother errors, which will not be usednode-webkit.


Conclusion


vscThere are many problems with other editors (sublime text,,atom,webstormetc.). It's good enough for a front-end engineer.



Of course, it's constantly improving. Wait for it to support the plug-in system, supportvimmode.



Visual Studio Code


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.