
1. Configure launch.json

#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:

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:

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:

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!
Can vscode hide minimapsApr 15, 2025 pm 07:33 PMIn 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 ipynbApr 15, 2025 pm 07:30 PMThe 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 7Apr 15, 2025 pm 07:27 PMVS 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 8Apr 15, 2025 pm 07:24 PMVS 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 AndroidApr 15, 2025 pm 07:21 PMRunning 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 extensionApr 15, 2025 pm 07:18 PMThe 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 numpyApr 15, 2025 pm 07:15 PMProblems 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?Apr 15, 2025 pm 07:12 PMYes, 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.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

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 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 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
Recommended: Win version, supports code prompts!

SublimeText3 Mac version
God-level code editing software (SublimeText3)






