Настройка отладки C# говорит
Args
Это аргументы, которые будут переданы в вашу программу.
Доступность
- launch.json
- settings.json
- launchSettings.json
как commandLineArgs
Код: Выделить всё
{
"version": "0.2.0",
"configurations": [
{
"type": "dotnet",
"request": "launch",
"args": "foo"
}
]
}
Если я пишу в .vscode/launchSettings.json
Код: Выделить всё
{
"profiles": {
"Company-House": {
"commandName": "Project",
"targetProject": "${workspaceFolder}/CompanyHouse/CompanyHouse.csproj",
"executablePath": "${workspaceFolder}/CompanyHouse/bin/Debug/net8.0/CompanyHouse",
"commandLineArgs": "should-complain, but currently entirely ignored",
}
}
}
Есть третий недокументированный вариант: добавление в .csproj
Код: Выделить всё
actually works
Подробнее здесь: https://stackoverflow.com/questions/781 ... in-vs-code
Мобильная версия