Re: debug an excutale which is launched by another excutable
- From: "Oleg Starodumov" <com-dot-debuginfo-at-oleg>
- Date: Fri, 16 Sep 2005 12:00:57 +0300
> 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.
>
You mean that the second app exits before you can attach to it?
Or something else?
> Is there any way to set breakpoint in the second app to debug it?
>
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]
.
- Prev by Date: Wrong Source is used when debugging...
- Next by Date: My own Tracelistener options thru app.config?
- Previous by thread: Wrong Source is used when debugging...
- Next by thread: My own Tracelistener options thru app.config?
- Index(es):
Relevant Pages
|