p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   .NET 4 and Visual Studio 2010 General Discussions (http://p2p.wrox.com/forumdisplay.php?f=579)
-   -   How to Debug a Console Application which starts with an Argument. (http://p2p.wrox.com/showthread.php?t=85717)

codehelp November 18th, 2011 03:01 AM

How to Debug a Console Application which starts with an Argument.
 
Hello everyone,
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.

Regards


All times are GMT -4. The time now is 01:04 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.