问题
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