Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

The method of debugging js Project with vscode breakpoint

Shulou Source: shulou.com Published: 2022-06-02 15:32:55 10月03日 Update

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!

Tags: Breakpoints projects articles selection configuration methods files native top value information interests at the same time circles buttons plug-ins ways more friends servers Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno NVidia Apple MariaDB Shulou Information