Search for Debugger for Chrome in the extensions on the left and click to install
Click f5 under your html project directory, or Select the debug button
# on the left and select the drop-down button. There will be an add. It will appear after selecting chrome
The configuration file of laungh.json is under your own project directory
#However, if you want to debug different code files, you need to modify the configuration file every time
{ "version": "0.2.0", "configurations": [{ "type": "chrome", "request": "launch", "name": "Launch Chrome against localhost", "url": "http://localhost:8080", "webRoot": "${workspaceRoot}" }, { "type": "chrome", "request": "attach", "name": "Attach to Chrome", "port": 9222, "webRoot": "${workspaceRoot}" }, { "name": "Launch index.html (disable sourcemaps)", "type": "chrome", "request": "launch", "sourceMaps": false, "file": "${workspaceRoot}/jsTest/test1/test1.html" #每次需要修改这里的文件地址 } ] }
Here you can debug, select the Launch index.html (disable sourcemaps) debugging item in
The above is the detailed content of How to debug js code in vscode. For more information, please follow other related articles on the PHP Chinese website!

VisualStudio offers three license types: Community, Professional and Enterprise. The Community Edition is free, suitable for individual developers and small teams; the Professional Edition is annually subscribed, suitable for professional developers who need more functions; the Enterprise Edition is the highest price, suitable for large teams and enterprises. When selecting a license, project size, budget and teamwork needs should be considered.

VisualStudio is suitable for large-scale project development, while VSCode is suitable for projects of all sizes. 1. VisualStudio provides comprehensive development tools, such as integrated debugger, version control and testing tools. 2.VSCode is known for its scalability, cross-platform and fast launch, and is suitable for fast editing and small project development.

VisualStudio is suitable for large projects and Windows development, while VSCode is suitable for cross-platform and small projects. 1. VisualStudio provides a full-featured IDE, supports .NET framework and powerful debugging tools. 2.VSCode is a lightweight editor that emphasizes flexibility and extensibility, and is suitable for various development scenarios.

When choosing VisualStudio, the free version is suitable for individual developers and small teams, and the paid version is suitable for large enterprises and users who need advanced features. 1. The free CommunityEdition provides basic development tools for individuals and small teams. 2. Paid Professional and Enterprise Editions provide advanced features and support for business environments and large teams.

VisualStudio provides a variety of features to improve development efficiency. 1. Interface and navigation: manage projects through menu bar, toolbar and other components. 2. Code editing and intelligent perception: Provide code completion and formatting tools. 3. Debugging and testing: Support breakpoint settings and variable monitoring. 4. Version control: Integrate with Git and other systems to facilitate team collaboration.

VisualStudio and VSCode have their own advantages and disadvantages, which are suitable for different development needs. VisualStudio is suitable for large projects and provides rich functions; VSCode is lightweight, flexible, and has cross-platform support.

VisualStudio is a multi-functional integrated development environment that supports multiple programming languages and complete development processes. 1) Code editing: Provides intelligent code completion and reconstruction. 2) Debugging: Built-in powerful debugging tools, supporting breakpoint and variable monitoring. 3) Version control: Integrate Git and TFVC to facilitate team collaboration. 4) Testing: Supports multiple test types to ensure code quality. 5) Deployment: Provides a variety of deployment options to support deployment requirements from on-premises to the cloud.

VisualStudio is suitable for large-scale project development, while VSCode is suitable for lightweight and highly customizable environments. 1. VisualStudio provides powerful intelligent perception and debugging functions, suitable for large-scale projects and enterprise-level development. 2. VSCode provides flexibility and customization capabilities through extended systems, suitable for multiple programming languages and cross-platform development.


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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

WebStorm Mac version
Useful JavaScript development tools
