What is the best way to test a command line parameter from within the Visual Studio C# Express 2010 IDE? All i see is the "Play" button to start debugging (and running) my program.
You could set command line arguments in the properties of the project:
Setting the arguement value in the project properties is good if the values don't change.
If you are wanting to test many different command line arguement combinations, going to the Properties window between each run can get very tedious. One way to get around this is to place a breakpoint on the {
at the start of the Main
method and set a debug watch on the command arguments.
Then all that is needed is to run the program, wait for it to break and then edit the value of the arguement in the watch window. When you continue execution it will be as if you had given those command line arguements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With