VSCode中JS脚本的运行(控制台输出配置)

F5开始调试

进入launch.json中进行如下配置

{
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [{  
        "name": "Launch",  
        "type": "node",  
        "request": "launch",  
        "program": "${workspaceRoot}/03.js",  //此处是要运行的脚本文件
        "stopOnEntry": false,  
        "args": [],  
        "cwd": "${workspaceRoot}",  
        "runtimeExecutable": null,  
        "runtimeArgs": ["--nolazy"],  
        "env": { "NODE_ENV": "development" },  
        "externalConsole": false,  
        "preLaunchTask": "",  
        "sourceMaps": false,  
        "outDir": null  
    },  
    {  
        "name": "Attach",  
        "type": "node",  
        "request": "attach",  
        "port": 5858  
    }  
]
}

猜你喜欢

转载自blog.csdn.net/qq_41000891/article/details/80293958