My goal is to be able to step though (debug) the code so that I can understand the application.
Right now I have been able to compile the application and set break points to see where the problem lies. The application starts in the main method and stops executing when it is looking for 2 parameters that need to be passed.
Right now to run the application I click on a windows command file that looks like the following:
Start .\samclt\bin\Debug\samcl.exe encrypted_value https://test/test/testWebService 1 ITEM
The first value is 'encrypted_value' is an encrypted value, the second parameter is used to call a webservice named testWebService and the values of 1 and ITEM are passed to the web service.
Due to what I stated above, I have the following two questions:
1. When I want to start the C# application from a debug mode, how can I pass the two required parameters to the application and let the application 'see' parameter values and have access to the values?
2. When I start the C# application from the command prompt, how can I pass the two required parameters to the application and let the application 'see' parameter values and have access to the values?
VulpesPosted Aug 24, 2012, 12:55 PM
1. Right click on your project's properties in Solution Explorer and click Open from the dropdown.
2. In the dialog box which opens up, click on the Debug tab and type in your command line arguments, separated by spaces. If any of the arguments contains embedded spaces, place the whole argument in double quotes.
3. Debug the application.
On the second point, unless you're changing the application so that only 2 parameters are passed, it sounds to me like you need to pass 4 parameters. If that's the case, then from the command line you'll need to move to the \bin\\debug folder and type in:
samcl.exe encrypted_value https://test/test/testWebService 1 ITEM