必须在launch.json文件中提供参数。有一个称为args的字段,将传递参数。如果您必须传递-x'value'或--y = false或--z之类的参数,请编辑launch.json并在arg文件中添加如下所示的参数-
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "path of the exe",
"args": [ "--x", "value" ,"--y=false", "--z"],
"stopAtEntry": false,
"cwd": "current working directory",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
}
必须在launch.json文件中提供参数。有一个称为args的字段,将传递参数。如果您必须传递-x'value'或--y = false或--z之类的参数,请编辑launch.json并在arg文件中添加如下所示的参数-
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "path of the exe",
"args": [ "--x", "value" ,"--y=false", "--z"],
"stopAtEntry": false,
"cwd": "current working directory",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
}