Friday, December 23, 2011

Specifying Command Line Arguments in Visual Studio 2010

In the real world, the user has the option of offering command-line arguments when starting an application. However, one may find useful when testing or debugging a program to automatically offer command-line arguments each time the application starts.

This can be done in Visual Studio 2010, by going to the project's properties either by right-clicking on your project and selecting the Properties item or by going to Project -> <name_of_your_project>'s Properties in the menu bar and then going to the Debug menu.
In Start Options, you will have a text box where you can input  (just like when starting the application from a console) the command line arguments. After saving your settings at each application start the program will receive the arguments you specified.

No comments:

Post a Comment

Got a question regarding something in the article? Leave me a comment and I will get back at you as soon as I can!

Related Posts Plugin for WordPress, Blogger...
Recommended Post Slide Out For Blogger