In Visual Studio Code, how to pass arguments in launch.json

China☆狼群 提交于 2021-02-07 12:53:20

问题


In Visual Studio Code, in the launch.json file that launches the app I'm writing, how do I add command line arguments?


回答1:


As described in the documentation, you need to use the args attribute. E.g.

{
    "type": "node",
    "request": "launch",
    "name": "Debug App",
    "program": "${workspaceFolder}/main.js",
    "args": ["arg1", "arg2", "arg3"]
}


来源:https://stackoverflow.com/questions/57889703/in-visual-studio-code-how-to-pass-arguments-in-launch-json

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!