Re: debug an excutale which is launched by another excutable

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




> 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]







.



Relevant Pages

  • Re: Shared memory
    ... >> I am using memory mapped files for cross process communication. ... >> mapped file which is mapped to the swap file by calling ... Problem is the first app is only consuming the data and has no idea how much ... It is the second app that source the data. ...
    (microsoft.public.vb.winapi)
  • Re: CreateProcess( ... ) always on top of my app.
    ... If you wrote the second app, you can do anything you want, including minimizing it if it ... is being run as a child app under the main app. ...
    (microsoft.public.vc.mfc)
  • Re: What to do when disaster strikes but requires user input
    ... the second app checks this file, if it does not exist or the entry ... I wrote another App which makes sure that the first App ... the second App restarts the first App and sends ...
    (microsoft.public.fox.programmer.exchange)
  • Re: SMS Notification
    ... create a second app and register it for notification ... >I need to get notified if an SMS message has been received. ...
    (microsoft.public.pocketpc.developer)
  • Re: SMS Notification
    ... create a second app and register it for notification ... >I need to get notified if an SMS message has been received. ...
    (microsoft.public.windowsce.embedded.vc)