Home > Development Tools > VSCode > body text

How to use debugging with vscode

王林
Release: 2020-02-11 17:47:14
Original
6662 people have browsed it

How to use debugging with vscode

1. Configure launch.json

How to use debugging with vscode

#After configuring this, don’t rush to try it, because at this time click the green After starting the start button debugging, I found that the page could not be opened, but there was a prompt that the browser link failed.

At this time, we need to install server plug-ins such as apache and iis to support the page running and displaying in the simulated server.

2. Install the plug-in [Live Server]

This is the plug-in mentioned above that supports the page running in the simulation server, as shown in the picture:

How to use debugging with vscode

If the installation is completed and there is a [Reload] prompt on the left, click the button to reload.

3. Open the html page and conduct debugging testing

The basic work is ready. At this time, there are two debugging modes:

Use local static page debugging :

Select the test option you configured, open the page that needs to be debugged, and press F5 to start debugging, as shown in the figure:

How to use debugging with vscode

Use Debugging in server form:

The live server we installed comes in handy at this time. Also open the page to be debugged, right-click anywhere on the page and select "Open with live server". As shown in the picture:

How to use debugging with vscode

Complete!

Related learning recommendations: vscode tutorial

The above is the detailed content of How to use debugging with vscode. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!