vscode-使用断点

在vscode中使用断点技术

第一步:安装插件 Debugger for Chrome Extension
第二步:然后需要配置 VSCode 来连接到 Chrome
image
第三步:第二步过后会生成一个 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": [
        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome against localhost",
            // "skipFiles": [
            //     "<node_internals>/**"
            // ],
            // "program": "${file}",
            "url": "http://localhost:3000",
            "webRoot": "${workspaceRoot}"
        }
    ]
}

第四步:按F5 开始断点调式。

posted @ 2022-01-16 21:19  依梦维马  阅读(3749)  评论(0)    收藏  举报