By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,021 Members | 1,240 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,021 IT Pros & Developers. It's quick & easy.

Debugging two processes question/launching two debug processes

P: n/a
I am writing a fairly complex application in c# and Visual Studio .Net 2003.
Right now I am working on a simple console application (to be launched in the
future from a service) that receives messages sent via IP from an external
device. I am also writing a simulator of that external device.

My question: How do I setup the Visual Studio so that when I start debugging
my c# application, both my message sink AND simulator are launched?

I have both applications setup as projects within a single solution, and
have been manually launching both via the right mouse button menu and the
debug/start new instance selections... I remember being able to do this in VS
6.0, so it just has to be possible... I just can't come up with the right
search to find how.

Thanks for your help,
Marc
Nov 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Use

System.Diagnostic.Debugger.Break() to open an instance of Visual Studio as a
debugger.

Good Luck!

Rafael.
"m11533" <m1****@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com...
I am writing a fairly complex application in c# and Visual Studio .Net
2003.
Right now I am working on a simple console application (to be launched in
the
future from a service) that receives messages sent via IP from an external
device. I am also writing a simulator of that external device.

My question: How do I setup the Visual Studio so that when I start
debugging
my c# application, both my message sink AND simulator are launched?

I have both applications setup as projects within a single solution, and
have been manually launching both via the right mouse button menu and the
debug/start new instance selections... I remember being able to do this in
VS
6.0, so it just has to be possible... I just can't come up with the right
search to find how.

Thanks for your help,
Marc

Nov 16 '05 #2

P: n/a
I don't completely follow your suggestion? Are you saying I need to put this
call in my code? Does it go into my simulator or server? I just remember a
project property in VS 6 that let me have it execute a different program in
addition to the current executable.

Thanks again for your help,
Marc

"Rafael Pereyra" wrote:
Use

System.Diagnostic.Debugger.Break() to open an instance of Visual Studio as a
debugger.


Nov 16 '05 #3

P: n/a
Sorry, I was busy and made a very short reply...

Yes if you put that line in your code (C# i don't know the sintax in VB.NET
however I think is the same) at the beginning or wherever you want to debug
your program.

Use the debug version of your program, at that point the program invokes a
debugger (all debuggers installed in your system AFAK). Simply choose a new
instance of Visual Studio and there you go...

A new instance of Visual Studio will popup and inmediatelly attaches to your
process using the debug information available.

Good Luck.
Rafael.
"m11533" <m1****@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
I don't completely follow your suggestion? Are you saying I need to put
this
call in my code? Does it go into my simulator or server? I just remember a
project property in VS 6 that let me have it execute a different program
in
addition to the current executable.

Thanks again for your help,
Marc

"Rafael Pereyra" wrote:
Use

System.Diagnostic.Debugger.Break() to open an instance of Visual Studio
as a
debugger.

Nov 16 '05 #4

P: n/a
Debug the service by attaching to process ('Debug' -> 'Processes') and then
IIRC there's an option to debug child processes also. You could give that a
bash.

"m11533" <m1****@discussions.microsoft.com> wrote in message
news:FB**********************************@microsof t.com...
I am writing a fairly complex application in c# and Visual Studio .Net
2003.
Right now I am working on a simple console application (to be launched in
the
future from a service) that receives messages sent via IP from an external
device. I am also writing a simulator of that external device.

My question: How do I setup the Visual Studio so that when I start
debugging
my c# application, both my message sink AND simulator are launched?

I have both applications setup as projects within a single solution, and
have been manually launching both via the right mouse button menu and the
debug/start new instance selections... I remember being able to do this in
VS
6.0, so it just has to be possible... I just can't come up with the right
search to find how.

Thanks for your help,
Marc

Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.