其他分享
首页 > 其他分享> > vscode中launch.json文件的配置

vscode中launch.json文件的配置

作者:互联网

转载内容:https://blog.csdn.net/qq_36150293/article/details/121063068

更正博主一个遗忘的细节:

代码参考:(主要是program配置)

// 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": [
        {
            //配置类型,这里是chrome浏览器类型
            "type": "chrome",
            // 请求配置类型,可以为launch(启动)或attach(附加)   
            "request": "launch",
            "name": "Launch Chrome against localhost",
            "url": "${file}",
            "sourceMaps": true, 
            "webRoot": "${workspaceRoot}"
        },
        {
            "name": "nodeLauch", //单独调试js,即可以直接运行js
            "type": "node",
            "request": "launch",
            "program": "D:\\c\\cAndPointLearn\\source\\${fileBasenameNoExtension}.exe", //这个配置成你要调试的文件、${file}当前打开的文件
            "stopOnEntry": false,
            "args": [],
            "cwd": "${workspaceRoot}",
            "runtimeExecutable": null,
            "runtimeArgs": [
                "--nolazy"
            ],
            "env": {
                "NODE_ENV": "development"
            },
            "console": "internalConsole",
            "preLaunchTask": "",
            "sourceMaps": false
        }
    ]
}

标签:name,launch,vscode,配置,js,json,program,attributes
来源: https://www.cnblogs.com/rong-xu-drum/p/16387809.html