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 debugging js Project with vscode breakpoint

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly introduces the vscode breakpoint debugging js project method, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor with you to understand.

Install a plug-in on VSCode: Debugger for Chrome

Load the project with VSCode

Press F5, the search box appears and select Chrome

Then a configuration prompt appears and the file launch.json is opened

Add a piece of configuration information to this file

{"name": "debugging with native Chrome", "type": "chrome", "request": "launch", "file": "${workspaceRoot} / index.html", / / "url": "http://mysite.com/index.html", / / when using an external server, please comment out file and use url instead And set useBuildInServer to false "http://mysite.com/index.html" runtimeExecutable: "C:\\ Program Files (x86)\\ Google\\ Chrome\\ Application\\ chrome.exe", / / change your Chrome installation path "sourceMaps": true, "webRoot": "${workspaceRoot}", / / "preLaunchTask": "build", "userDataDir": "${tmpdir}" "port": 5433}

Then, change the debugging method

As shown in the figure, select the circular button on the left, then come out of the debug configuration management interface, and select "debug with native Chrome".

Then set the breakpoint at the js of the project, press F5, and you can debug the breakpoint.

Thank you for reading this article carefully. I hope the article "how to debug the js project at vscode breakpoints" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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