I have an command line that uses arguments, I have no problem with this, but each time I want to test the application, I need to compile it, run the CMD, call the application with the parameters from the CMD, because I didn't find any solution that let me dynamically pass arguments to the console in Visual Studio Any idea about that? Thanks a lot!!
10 Answers
Goto Project->Properties and click the Debug Tab.
There is a section for command line arguments:

2 Comments
If you are using VS 2022, go to the project properties -> Debug -> General, and then click on "Open debug launch profiles UI".
1 Comment
In case someone is using VS Code for their project, you guys can just open the launch.json in the .vscode folder and under configurations you can just add an args key value pair like this:
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"args": ["What command you use to list all docker images"],
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopAtEntry": false
}
]
Comments
This information used to be persisted in a ProjectName.csproj.user file.
In the new .csproj format, this information is persisted in Properties\launchsettings.json. My current version of Visual Studio (17.3.2 apparently reads both of those when debugging.
If you ever see unexpected arguments, this may be the cause.


