patterncppCritical
Debugging with command-line parameters in Visual Studio
Viewed 0 times
withlinestudiodebuggingvisualcommandparameters
Problem
I'm developing a C++ command-line application in Visual Studio and need to debug it with command-line arguments. At the moment I just run the generated EXE file with the arguments I need (like this
program.exe -file.txt) , but this way I can't debug. Is there somewhere I can specify the arguments for debugging?Solution
Yes, it's in the Debug section of the properties page of the project.
In Visual Studio since 2008: right-click on the project node, choose Properties, go to the Debugging section -- there is a box for "Command Arguments".
On a more recent version of Visual Studio, you'll find it in "Project Debug Properties" under the run button:
In Visual Studio since 2008: right-click on the project node, choose Properties, go to the Debugging section -- there is a box for "Command Arguments".
On a more recent version of Visual Studio, you'll find it in "Project Debug Properties" under the run button:
Context
Stack Overflow Q#298708, score: 915
Revisions (0)
No revisions yet.