1. VSCode 上装插件:Debugger for Chrome ctrl+shift+p 选择Extensions:install Extensions,选择Debugger for Chrome,installing,然后reload 2. 修改launch.json { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [{ "name": "谷歌浏览器", //运行html文件,用谷歌浏览器打开 "type": "chrome", "request": "launch", "url": "${file}", "sourceMaps": true, "webRoot": "${workspaceRoot}" }, { "name": "nodeLauch", //单独调试js,即可以直接运行js "type": "node"