Specify Command Line Arguments in Visual Studio 2012

You’d normally pass command line arguments to your program when you invoke it from the command line.  However, for testing purposes, you may want to specify command line arguments that get passed to the program when you run it from the debugger.  You can do this in the Project Properties window, on the Debug tab.
Note that:


  • You can do this for all project types, e.g. console app, Win Forms, WPF
  • You can specify different arguments for Debug vs. Release mode
  • These arguments will be used only when running from the debugger