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:
- 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 tsdtsd query angular --action install
- 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:
- Open the file you want to debug, pressf5, and the editor will generate alaunch.json
- Modify thelaunch.jsonrelevant content, mainlynameand theprogramfield, and change it to your project corresponding to the
- Click the button on the left of the editor that looks like a spider.
- Click the button at the top left cornerDEBUGto start debugging
- 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.
- Open thevscconsole (Help > Toggle Developer Tools > Console)
- 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.
Write NODE.J with visual Studio code