How to Debug a Console Application which starts with an Argument.
I have a Console Application which is started with an argument (it accepts an XML file and processes it).
I check the args.Lenght to find out if an argument was supplied or not and display messages appropriately.
This application is part of a workflow in which another application calls this Console App with the XML file as argument.
When this happens VS does not step into the code for debugging. The exe behaves as standalone. The same thing happens when the exe is called from the command line.
I know that a Argument can be set in the Project Properties, but then VS will alway load the same XML file, which beats the purpose of Debugging.
Is there a way for VS to start in debug mode when this Console App exe is called either by an external App or when executed through the DOS Command Line.