debugging console app 
Author Message
 debugging console app

Hi, All

I need help on the following issue:

I developed a console app in C# which will be called by MSMQ trigger. Is
there a way that I could debug into the application when the MSMQ trigger
instantiate the console application (c:\test\myprog.exe) ? I tried to make
the change in some of the debugging properties such as debug mode, start
application, etc. and I could not make it work, Please provide a little
detailed instruction if you know the tricks. :)

Thanks very much!

John



Tue, 14 Sep 2004 14:02:57 GMT  
 debugging console app
John,

    For things like this, you are going to have to connect to the process
when it is spawned.

    To facilitate this, I would place a line in your console app which is
only applicable if DEBUG is true.  That line would hang the console process
until you pressed a key or something, giving you time to attach the
de{*filter*}.  Something like this would do:

#if DEBUG
// Tell the user to attach the de{*filter*} to the process.
System.Console.Write("Hit Enter after de{*filter*} is attached to process...");

// Wait for the enter key to be pressed.
System.Console.ReadLine();

#endif

    Hope this helps.

--
               - Nicholas Paldino [.NET MVP]


Quote:
> Hi, All

> I need help on the following issue:

> I developed a console app in c# which will be called by MSMQ trigger. Is
> there a way that I could debug into the application when the MSMQ trigger
> instantiate the console application (c:\test\myprog.exe) ? I tried to make
> the change in some of the debugging properties such as debug mode, start
> application, etc. and I could not make it work, Please provide a little
> detailed instruction if you know the tricks. :)

> Thanks very much!

> John



Tue, 14 Sep 2004 22:52:11 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Debugging Console Apps

2. Debugging Console App?

3. Debug console app in VisStudio

4. Debugging console app...

5. Debug Win32 Console app

6. VC++ 4.0 Standard and console apps debugging

7. Debugging Win32 console apps

8. Invoking a console app and hiding the console.

9. Connecting a console app and a WIN32 app using pipes

10. porting from win32 app to win32 console app

11. porting from win32 app to win32 console app

12. dif between console app and normal win app

 

 
Powered by phpBB® Forum Software