Recently, my friend Kishore asked me how to pass command line arguments to applications through Visual Studio. It has been long time since I ever passed any command line args to apps while debugging. For convenience sake, I usually hard code and later change it once I think my app does not break(which is not good ofcourse). Anyway, here is how you do ...
1. Go to Solution Explorer. Right click on the project and click Properties
2. Now in the Properties page that you see, go to Debug tab.
3. In debug tab, go to Start Options Section in which you see a textarea with title "Command Line Arguments"
Simple enough but not as easy as it should be. There should have been a menu item within build which you can use to directly pass arguments to your application. May be, a Visual Studio Add-in could do that, but the add-in development is very painful and the documentation does not match with what Visual Studio 2008 actually gives.
4 comments:
Thanks, really appreciated.
Helped :) thanks!!
Спасибо! Помогло!
From Russia with love!
Thanks a lot...
Post a Comment