Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of configuring js running Environment by vscode

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how to configure the js running environment for vscode. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

The VSCode interface is very simple and after installation, all the functions are clear at a glance. We need to install plug-ins and click on the tools and languages shown in the figure:

Install the following two plug-ins as shown in the figure: (you can also choose others. This is just an example)

To debug a js, you need to create a html document to add the js method, and simply create a file, which can be dragged directly to the compiler, as follows:

Windows.alert ('Hello World')

After the file is placed in the compiler, we press F5 and a pop-up box tells us what environment to use, because we haven't created it yet, so selecting the more button to add a plug-in allows us to debug:

To enter the list of extension stores, we can select the Debugger for Chrome plug-in to install. After installation, we need to restart the environment to take effect, or click reload:

After installation, you can see Chrome when you press F5 again. After selecting, the compiler will create a .vscod folder with a launch.json configuration file in the same directory as the current html file, and display it in the compiler:

Next, you need to configure IIS, but it is currently in the learning stage, and the later is not to learn web, so we do not need to configure any native IIS services. You can enter the path in the corresponding value of url. If you do not know what the path is, you can open it with your browser first, and directly copy the address of the browser to the corresponding value of url as follows:

{"version": "0.2.0", "configurations": [{"type": "chrome", "request": "launch", "name": "Launch Chrome against localhost", "url": "file:///C:/Users/xfdg/Desktop/jsCode/helloworld.html"," "webRoot": "${workspaceRoot}"}]}

After we have done this, press F5 and we will find that it is working properly and we can safely learn the basics of js:

This is the end of the method of configuring the js running environment for vscode. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report