473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Debugging a command line c# windows Application

How can I debug a C# GUI app which is invoked from the command line ?
Thanks in advance.

Mar 9 '06 #1
6 2967
lavu,

You can have the debugger attach to the process. Run your app, then
look under the debug menu for "attach to process". Then, you attach to the
process and viola, you are debugging.

Also, if you want to have command line parameters passed to your app
during debugging, you can set the startup properties of the project so that
you can feed command line parameters to it (instead of having to do it from
the command line).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"lavu" <th******@yahoo.com> wrote in message
news:11*********************@z34g2000cwc.googlegro ups.com...
How can I debug a C# GUI app which is invoked from the command line ?
Thanks in advance.

Mar 9 '06 #2

"lavu" <th******@yahoo.com> wrote in message
news:11*********************@z34g2000cwc.googlegro ups.com...
| How can I debug a C# GUI app which is invoked from the command line ?
|
|
| Thanks in advance.
|

VsJITDebugger.exe -p <pid>
where pid is the process id of the running app. you want to debug.

Willy.
Mar 9 '06 #3
On 9 Mar 2006 08:18:00 -0800, lavu wrote:
How can I debug a C# GUI app which is invoked from the command line ?
Thanks in advance.


Hi Lavu,
Try dbgclr.exe.
Regards
Mark
Mar 9 '06 #4
My problem is that I need the debugger to debug right from the
beginning of the application , not after a process/or pid is
available for that app.
I used Nicholas' second suggestion and passed command line params
through my startup properties. That worked like a
charm. Thank you.

Mar 9 '06 #5
Look in the Project Properties under Configuration Properties ->
Debugging. You'll see a property called "Command Line Arguments". Put
your command line arguments in there and then just use the Debugger as
you would for any Windows application.

Mar 9 '06 #6

"lavu" <th******@yahoo.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
| My problem is that I need the debugger to debug right from the
| beginning of the application , not after a process/or pid is
| available for that app.
| I used Nicholas' second suggestion and passed command line params
| through my startup properties. That worked like a
| charm. Thank you.
|

For this you can run devenv.exe /debugexe "execname" args.
Willy.
Mar 9 '06 #7

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

Similar topics

2
by: Rathtap | last post by:
My app calls another app asynchronously. How do I debug into the called app?
3
by: R Millman | last post by:
under ASP.NET, single stepping in debug mode appears not to stop within event procedures. i.e. 1) Create web page with submit button and event procedure for the click event in the code behind...
16
by: Dean R. Henderson | last post by:
I have a project built for ASP.NET that recently started running really slow in debug mode (it takes about 10 seconds or more to step from one line of code to the next). This just started...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
0
by: Ken Allen | last post by:
The MSDN documentation on remote debugging is a bit sparse, to say the least, and there is almost no information available on the 'best' way to configure this. I should note that my development...
3
by: Andrew Ducker | last post by:
I have an application that has to take numerous different command line options. I wrote an app launcher to call into it (by creating a process, setting the filename/arguments and then starting...
4
by: Greg | last post by:
I have a very simple Visual Basic .NET 2003 class library project ClassLibrary1 configured to run an external program (in this case C:\WINDOWS\system32\wscript.exe), in the Debugging Configuration...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
2
jwwicks
by: jwwicks | last post by:
C/C++ Programs and Debugging in Linux This tutorial will give you a basic idea how to debug a program in Linux using GDB. As you are aware Visual Studio doesn’t run on Linux so you have to use...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...

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.