all groups > visual studio .net debugging > september 2005 >
You're in the

visual studio .net debugging

group:

debug an excutale which is launched by another excutable


debug an excutale which is launched by another excutable keith
9/15/2005 5:08:02 PM
visual studio .net debugging:
I have a win project which is in a solution and have another win app in
another solution.

In the first win app, I use Process.Start() to launch the second one.

since the two win apps run in different processes, I cannot use
attach in menu Debug-->Processes for debug.

Is there any way to set breakpoint in the second app to debug it?

Thanks


Re: debug an excutale which is launched by another excutable Oleg Starodumov
9/16/2005 12:00:57 PM

[quoted text, click to view]

You mean that the second app exits before you can attach to it?
Or something else?

[quoted text, click to view]

There are various possible ways. For example:

- Introduce a delay at startup of the second application
(e.g. using Thread.Sleep or a message box), and use
Debug | Processes to attach to it during this timeout.

- Use hard-coded breakpoint (Debug.Break) in the second application
to break into the debugger when needed (VS.NET must be
registered as just-in-time debugger - check Tools | Options | Debugging |
Just-in-time | "Common Language Runtime")

- Use the approach descibed here to launch VS.NET automatically
when the second app is started:
http://msdn.microsoft.com/library/en-us/vsdebug/html/vxtskLaunchingDebuggerAutomatically.asp
(see the note about managed applications at the end)

Regards,
Oleg
[VC++ MVP]






AddThis Social Bookmark Button