I am working on a Visual C++ application that works only if command line arguments are passed to it. Since I have more kind of tests and arguments to pass to my application, passing them by the Project -> Options -> Arguments
is not a good approach. I am currently looking for some kind of Visual Studio extension that allows me to run my application with arguments right from Visual Studio.
Asked
Active
Viewed 259 times
0

Victor
- 13,914
- 19
- 78
- 147
-
1I know this pain. VS really doesn't expect the command line to be an actual interface to the program. Xcode at least lets you selectively enable command line arguments you've input, so switching between different inputs is a matter of checking an unchecking boxes rather than retyping from scratch. – bames53 Aug 29 '13 at 18:05
-
I started learning about extending Visual Studio. I would like how to create this little thing in my Extension, but I don't really know how to operate with VS from an extension to start debugging, etc... – Victor Aug 29 '13 at 18:07
-
I haven't tried this, but can you pass environment variables as the arguments (e.g. set them to something like "%first% %second%" in Visual Studio)? Then you could set the environment variables any way you like (e.g. with batch files). – Matthew Strawbridge Aug 29 '13 at 18:30
1 Answers
0
You can pass command line arguments to your program during debugging:
Right click on your project -> Properties -> Configuration Properties -> Debugging

Ben
- 1,287
- 15
- 24