• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

How can I debug with a launcher application with MSVS?

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

mccoyn

Senior Member
Joined
Nov 17, 2003
Location
Michigan, USA
I am writing a program that needs to be launched by another program, which I have the source to. So, for example, I am developing program B, which must be launched by program A. I want to be able to debug B.

When I select Debug/Run in Visual Studio I want it to run A, without debugging it. A will launch B, which I want Visual Studio to debug and stop at a specified breakpoint.

Anyone know how to do this?
 
VS can debug DLLs, try to do it that way. or maybe let program A call the MSVS debugger with program B as a parameter.
The dirty way is to put in a CCh (aka int 3) as the first byte of the WinMain in program B. Then run Program A under the debugger. Program B will now break into the debugger
 
klingens said:
or maybe let program A call the MSVS debugger with program B as a parameter.
This sounds like the best idea to me. It just so happens that the command line arguments to program A are the command line to program B. So, I can just change the command args to use the debugger. I'll have to look up how to call the debugger, but it sounds like it will work.

This will have to wait until Monday when I am back at work.

Thanks.
 
Back