473,804 Members | 2,989 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Debug a console program with arguments?

I have a console program that takes one file and outputs another. The file
name is submitted as an argument as usual. I can't figure out how to have
the nice step-by-step debugging while also submitting arguments on the
command-line. That is, first run the program as the end user, submit the
argument, then get to the step-by-step debugging mode. Is there a way to do
this?

Gustaf

Nov 15 '05 #1
2 2227
Gustaf Liljegren <gu************ **@bredband.net > wrote:
I have a console program that takes one file and outputs another. The file
name is submitted as an argument as usual. I can't figure out how to have
the nice step-by-step debugging while also submitting arguments on the
command-line. That is, first run the program as the end user, submit the
argument, then get to the step-by-step debugging mode. Is there a way to do
this?


Do you definitely have to run it as an end user rather than just
putting the command line arguments in the project properties in Visual
Studio?

I'm sure that you *can* attach the debugger to a running process, but
it's easier to do the above if you can :)

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #2
"Jon Skeet [C# MVP]" <sk***@pobox.co m> wrote:
Do you definitely have to run it as an end user rather than just
putting the command line arguments in the project properties in Visual
Studio?


Nah. Nice. Thanks.

Gustaf
Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4909
by: David Yu | last post by:
Hi, anybody knows how to use debug window to start console application program with input arguments. In DOS window I can start my application program likes MQGET QTT1 DAVID.LOCAL which input Queue Manager and local queue. But If I want to run in debug mode how do I enter that two
9
1717
by: Nick Forrington | last post by:
Hi, I'm making a program and have a static Console class that I'm using to output things, these get sent to the console and also to the graphics on screen (I'm using SDL). One thing I'm having a bit of trouble with is passing strings and numbers in the same arguement e.g. Console::println("X=" + x); kind of thing?
1
18281
by: Michael Hetrick | last post by:
How would I pass parameters to a console application? I would like to do something like this: consoleapp.exe /o \\fileshare\origindirectory /d \\fileshare\destinationdirectory I'm not sure how to start the console app to read from the command line. Any assistance would be appreciated! Michael Hetrick
4
8744
by: Bill Cohagan | last post by:
I'm writing a console app (in C#) and I want to be able to redirect the standard input/output streams when it's run at a command prompt. IOW I want to support the "<" and ">" redirection syntax. The obvious way to do this is by using the static Console type properties, In and Out. When trying to debug the app in the IDE however, this doesn't appear to work. I've edited the project properties and added the necessary text to the "command...
3
1669
by: ES Kim | last post by:
Hi, I am using VC++ .NET 7.0. I'd like to debug my console program, using redirection of input/output for convenience. Help menu tells me it's possible to specify a file name as a command-line argument like '< file', but I couldn't make it. What have I done wrong? --
1
1931
by: Stephen Miller | last post by:
On my development machine (where the group 'Everyone' has full access to every directory), the following code successfully shells to a console application: Dim objShell As System.Diagnostics.Process = New System.Diagnostics.Process() With objShell .StartInfo.FileName = "C:\Project\MyApp\MyApp.exe" .StartInfo.Arguments = " 123" .StartInfo.WorkingDirectory = "C:\Project\MyApp\"
1
4604
by: Jesper, Denmark | last post by:
Hi, Im trying to get command line arguments into my VB windows application. I've set some arguments under the 'debug' tab underproject properties. When running the program I get the following message: "The current project settings specify that the project will be debugged with specific security permissions. In this mode, command line arguments are not be passed to the executable. Do you want to continue debugging anyway?" I've...
3
13861
by: TC | last post by:
I'm trying to debug a console application, but I can't see the console output. I've seen many references which say that console output is supposed to appear on the Output window when the application is run in Debug mode. However, I just can't get that to work. I'm using Visual Studio 2005. I've confirmed that my application is compiled as a console application, and that I'm running in Debug mode. To investigate this issue, I've reduced...
2
9044
by: joelkeepup | last post by:
Hi, I made a change this morning and now im getting an error that says either "a is undefined or null" or "e is undefined or null" the microsoft ajax line is below, I have no idea how to figure this problem out. Any suggestions? thanks Joel
0
9704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10562
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10303
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6845
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5508
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2978
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.