search
HomeDevelopment ToolsVSCodeHow to use debugging with vscode

How to use debugging with vscode

Feb 11, 2020 pm 05:47 PM
vscodedebug

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!

Statement
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
Can vscode hide minimapsCan vscode hide minimapsApr 15, 2025 pm 07:33 PM

In VS Code, minimap is an option that is essentially a code file thumbnail that allows you to quickly browse the code structure. Its effectiveness depends on the complexity of the code and the encoding style. You can disable or customize the minimap through settings, configuring it according to personal preferences and project needs.

Can vscode run ipynbCan vscode run ipynbApr 15, 2025 pm 07:30 PM

The key to running Jupyter Notebook in VS Code is to ensure that the Python environment is properly configured, understand that the code execution order is consistent with the cell order, and be aware of large files or external libraries that may affect performance. The code completion and debugging functions provided by VS Code can greatly improve coding efficiency and reduce errors.

Can vscode run in Windows 7Can vscode run in Windows 7Apr 15, 2025 pm 07:27 PM

VS Code is still available on Windows 7, but is highly not recommended. Windows 7 lacks security updates and patches, resulting in security risks and VS Code compatibility issues. Although simple code editing is barely competent, it is recommended to upgrade to Windows 10 or later for complex development or for extensions.

Can vs code run in Windows 8Can vs code run in Windows 8Apr 15, 2025 pm 07:24 PM

VS Code can run on Windows 8, but the experience may not be great. First make sure the system has been updated to the latest patch, then download the VS Code installation package that matches the system architecture and install it as prompted. After installation, be aware that some extensions may be incompatible with Windows 8 and need to look for alternative extensions or use newer Windows systems in a virtual machine. Install the necessary extensions to check whether they work properly. Although VS Code is feasible on Windows 8, it is recommended to upgrade to a newer Windows system for a better development experience and security.

Can vscode run in AndroidCan vscode run in AndroidApr 15, 2025 pm 07:21 PM

Running Visual Studio Code (VS Code) on Android requires: Remote Development Environment (Remote Server or Home Computer) Connect to the server via Remote - SSH Extension Stable Network Connection Check the correctness of the environment configuration for extensions of the development environment (such as Java or Python extensions) (JDK version, Android SDK, etc.)

vscode cannot install extensionvscode cannot install extensionApr 15, 2025 pm 07:18 PM

The reasons for the installation of VS Code extensions may be: network instability, insufficient permissions, system compatibility issues, VS Code version is too old, antivirus software or firewall interference. By checking network connections, permissions, log files, updating VS Code, disabling security software, and restarting VS Code or computers, you can gradually troubleshoot and resolve issues.

vscode cannot import numpyvscode cannot import numpyApr 15, 2025 pm 07:15 PM

Problems when importing NumPy in VS Code are usually due to Python environment configuration issues. To resolve this issue: Make sure that the Python extension is installed. Install NumPy (pip install numpy) in the terminal. Check that the Python interpreter is correct. Check that the code file path is correct. Verify that the import statement is correct. Try restarting VS Code, checking the virtual environment, upgrading pip, checking permissions and using requirements.txt.

Can visual studio code run javascript?Can visual studio code run javascript?Apr 15, 2025 pm 07:12 PM

Yes, Visual Studio Code can run JavaScript and provides a range of powerful features to improve development efficiency. 1. Prepare JavaScript code and VS Code environment. 2. Install Node.js to interpret execution. 3. Run the code using built-in terminals or extensions (such as Prettier, ESLint, Debugger for Chrome). 4. Set breakpoints correctly for effective debugging. 5. Use error prompts and smart prompts to improve coding speed and accuracy.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)