Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 4 and Visual Studio 2010 > .NET 4 and Visual Studio 2010 General Discussions
|
.NET 4 and Visual Studio 2010 General Discussions For discussing anything about .NET 4, WPF, WCF, the rest of the .NET 4 Framework, and Visual Studio 2010 that isn't about a specific Wrox book. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET 4 and Visual Studio 2010 General Discussions section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 18th, 2011, 03:01 AM
Authorized User
 
Join Date: Jul 2007
Posts: 29
Thanks: 2
Thanked 0 Times in 0 Posts
Default 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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Sys.Debug messages not appearing in Output console Lee Dumond Ajax 0 May 5th, 2009 03:38 PM
Open a C# application while window starts jklanka General .NET 2 October 30th, 2007 09:24 AM
Console application but no Console gamotter C# 2 August 22nd, 2007 11:41 PM
run an application automaticaly when server starts sureshrgsl Servlets 1 April 16th, 2007 11:25 PM
Application starts again sarvesh189 Forum and Wrox.com Feedback 2 May 25th, 2005 02:07 AM





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