Thread: [GD-Windows] Debugging multiple apps
Brought to you by:
vexxed72
From: Research <res...@ga...> - 2006-08-18 07:31:35
|
I cannot figure out how to debug multiple apps in Visual Studio, and I can't seem to find the right google words to find this either. I'm have one application that launches another with ShellExecute. They are both in the same solution. I put breakpoints on the WinMain of the launched app and it never gets called. I know how to attach to something already running, but I need to trap the app on entry. So I want to step on the ShellExecute and have the other app start and immediately break. Is this possible in Visual Studio? Thanks, Brett |
From: brian s. <bri...@gm...> - 2006-08-18 15:40:51
|
You can use gflags.exe (google it) to specify that the second application should always be launched with a debugger attached. This would be a separate instance of Visual Studio, however. --brian On 8/18/06, Research <res...@ga...> wrote: > > I cannot figure out how to debug multiple apps in Visual Studio, and I > can't > seem to find the right google words to find this either. > > I'm have one application that launches another with ShellExecute. They are > both in the same solution. I put breakpoints on the WinMain of the > launched > app and it never gets called. > > I know how to attach to something already running, but I need to trap the > app on entry. So I want to step on the ShellExecute and have the other app > start and immediately break. > > Is this possible in Visual Studio? > > Thanks, > Brett > |
From: Chris J. <cj...@ob...> - 2006-08-18 19:31:19
|
One way I've dealt with stuff like this in the past is to put a simple loop like this as the first thing in your WinMain: bool wait =3D true; while (wait); Once the process is launched, just attach to it with the debugger and break. Set wait to false and start stepping. Chris > -----Original Message----- > From: gam...@li...=20 > [mailto:gam...@li...]=20 > On Behalf Of Research > Sent: Friday, August 18, 2006 12:28 AM > To: Gam...@li... > Subject: [GD-Windows] Debugging multiple apps >=20 > I cannot figure out how to debug multiple apps in Visual=20 > Studio, and I can't seem to find the right google words to=20 > find this either. >=20 > I'm have one application that launches another with=20 > ShellExecute. They are both in the same solution. I put=20 > breakpoints on the WinMain of the launched app and it never=20 > gets called. >=20 > I know how to attach to something already running, but I need=20 > to trap the app on entry. So I want to step on the=20 > ShellExecute and have the other app start and immediately break. >=20 > Is this possible in Visual Studio? >=20 > Thanks, > Brett=20 >=20 >=20 > -------------------------------------------------------------- > ----------- > Using Tomcat but need to do more? Need to support web=20 > services, security? > Get stuff done quickly with pre-integrated technology to make=20 > your job easier Download IBM WebSphere Application Server=20 > v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057& > dat=3D121642 > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 >=20 |
From: Brett B. \(Research\) <res...@ga...> - 2006-08-19 02:21:17
|
I'm glad to hear this is a valid technique! I resorted to a MessageBox as the first line so I can attach the process before continuing. But surely there's a way to do this properly? The doc goes on and on about how great solution files are because each project and the dependencies are known and so multi-language, multi-project debugging "is a breeze".... I want to feel the wind in my hair! Brett ----- Original Message ----- From: "Chris Jones" <cj...@ob...> To: "Game Development for MS Windows" <gam...@li...> Sent: Saturday, August 19, 2006 3:31 AM Subject: Re: [GD-Windows] Debugging multiple apps > One way I've dealt with stuff like this in the past is to put a simple > loop like this as the first thing in your WinMain: > > bool wait = true; > while (wait); > > Once the process is launched, just attach to it with the debugger and > break. Set wait to false and start stepping. > > Chris > >> -----Original Message----- >> From: gam...@li... >> [mailto:gam...@li...] >> On Behalf Of Research >> Sent: Friday, August 18, 2006 12:28 AM >> To: Gam...@li... >> Subject: [GD-Windows] Debugging multiple apps >> >> I cannot figure out how to debug multiple apps in Visual >> Studio, and I can't seem to find the right google words to >> find this either. >> >> I'm have one application that launches another with >> ShellExecute. They are both in the same solution. I put >> breakpoints on the WinMain of the launched app and it never >> gets called. >> >> I know how to attach to something already running, but I need >> to trap the app on entry. So I want to step on the >> ShellExecute and have the other app start and immediately break. >> >> Is this possible in Visual Studio? >> >> Thanks, >> Brett >> >> >> -------------------------------------------------------------- >> ----------- >> Using Tomcat but need to do more? Need to support web >> services, security? >> Get stuff done quickly with pre-integrated technology to make >> your job easier Download IBM WebSphere Application Server >> v.1.0.1 based on Apache Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057& >> dat=121642 >> _______________________________________________ >> Gamedevlists-windows mailing list >> Gam...@li... >> https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_id=555 >> > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 |
From: Alen L. <ale...@cr...> - 2006-08-19 05:12:47
|
Hi Brett, Using "_asm int 3 ;" is even easier. It will ask you to do JIT debugging (if this is configured properly), so no need to manually go and attach to the process. And you can reuse the same devstudio instance. Didn't use this often, but the little I did, it worked ok. HTH, Alen Brett wrote: > I'm glad to hear this is a valid technique! I resorted to a MessageBox as > the first line so I can attach the process before continuing. > But surely there's a way to do this properly? The doc goes on and on about > how great solution files are because each project and the dependencies are > known and so multi-language, multi-project debugging "is a breeze".... > I want to feel the wind in my hair! > Brett > ----- Original Message ----- > From: "Chris Jones" <cj...@ob...> > To: "Game Development for MS Windows" > <gam...@li...> > Sent: Saturday, August 19, 2006 3:31 AM > Subject: Re: [GD-Windows] Debugging multiple apps >> One way I've dealt with stuff like this in the past is to put a simple >> loop like this as the first thing in your WinMain: >> >> bool wait = true; >> while (wait); >> >> Once the process is launched, just attach to it with the debugger and >> break. Set wait to false and start stepping. >> >> Chris >> >>> -----Original Message----- >>> From: gam...@li... >>> [mailto:gam...@li...] >>> On Behalf Of Research >>> Sent: Friday, August 18, 2006 12:28 AM >>> To: Gam...@li... >>> Subject: [GD-Windows] Debugging multiple apps >>> >>> I cannot figure out how to debug multiple apps in Visual >>> Studio, and I can't seem to find the right google words to >>> find this either. >>> >>> I'm have one application that launches another with >>> ShellExecute. They are both in the same solution. I put >>> breakpoints on the WinMain of the launched app and it never >>> gets called. >>> >>> I know how to attach to something already running, but I need >>> to trap the app on entry. So I want to step on the >>> ShellExecute and have the other app start and immediately break. >>> >>> Is this possible in Visual Studio? >>> >>> Thanks, >>> Brett >>> >>> >>> -------------------------------------------------------------- >>> ----------- >>> Using Tomcat but need to do more? Need to support web >>> services, security? >>> Get stuff done quickly with pre-integrated technology to make >>> your job easier Download IBM WebSphere Application Server >>> v.1.0.1 based on Apache Geronimo >>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057& >>> dat=121642 >>> _______________________________________________ >>> Gamedevlists-windows mailing list >>> Gam...@li... >>> https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows >>> Archives: >>> http://sourceforge.net/mailarchive/forum.php?forum_id=555 >>> >> >> ------------------------------------------------------------------------- >> Using Tomcat but need to do more? Need to support web services, security? >> Get stuff done quickly with pre-integrated technology to make your job >> easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> _______________________________________________ >> Gamedevlists-windows mailing list >> Gam...@li... >> https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows >> Archives: >> http://sourceforge.net/mailarchive/forum.php?forum_id=555 > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 -- Alen |
From: Chris C. <can...@gm...> - 2006-08-19 10:18:00
|
VS.NET 2003 I know has facilities to enable multi-process COM debugging. So when your primary process calls a COM call that causes a second process to be created, VS is quite happy to attach and debug the second process, allowing you to step into COM calls as if they were local functions. I never tinkered with it to see about auto-attaching to running processes, but Alen's right about the JIT debugging happily offering up the running VS instance, even if its already debugging a different app. ChrisC Black Company Studios On 19/08/06, Alen Ladavac <ale...@cr...> wrote: > Hi Brett, > > > Using "_asm int 3 ;" is even easier. It will ask you to do JIT > debugging (if this is configured properly), so no need to manually go > and attach to the process. And you can reuse the same devstudio > instance. Didn't use this often, but the little I did, it worked ok. > > HTH, > Alen > > Brett wrote: > > > I'm glad to hear this is a valid technique! I resorted to a MessageBox as > > the first line so I can attach the process before continuing. > > > But surely there's a way to do this properly? The doc goes on and on about > > how great solution files are because each project and the dependencies are > > known and so multi-language, multi-project debugging "is a breeze".... > > > I want to feel the wind in my hair! > > > Brett > > > ----- Original Message ----- > > From: "Chris Jones" <cj...@ob...> > > To: "Game Development for MS Windows" > > <gam...@li...> > > Sent: Saturday, August 19, 2006 3:31 AM > > Subject: Re: [GD-Windows] Debugging multiple apps > > > >> One way I've dealt with stuff like this in the past is to put a simple > >> loop like this as the first thing in your WinMain: > >> > >> bool wait = true; > >> while (wait); > >> > >> Once the process is launched, just attach to it with the debugger and > >> break. Set wait to false and start stepping. > >> > >> Chris > >> > >>> -----Original Message----- > >>> From: gam...@li... > >>> [mailto:gam...@li...] > >>> On Behalf Of Research > >>> Sent: Friday, August 18, 2006 12:28 AM > >>> To: Gam...@li... > >>> Subject: [GD-Windows] Debugging multiple apps > >>> > >>> I cannot figure out how to debug multiple apps in Visual > >>> Studio, and I can't seem to find the right google words to > >>> find this either. > >>> > >>> I'm have one application that launches another with > >>> ShellExecute. They are both in the same solution. I put > >>> breakpoints on the WinMain of the launched app and it never > >>> gets called. > >>> > >>> I know how to attach to something already running, but I need > >>> to trap the app on entry. So I want to step on the > >>> ShellExecute and have the other app start and immediately break. > >>> > >>> Is this possible in Visual Studio? > >>> > >>> Thanks, > >>> Brett > >>> > >>> > >>> -------------------------------------------------------------- > >>> ----------- > >>> Using Tomcat but need to do more? Need to support web > >>> services, security? > >>> Get stuff done quickly with pre-integrated technology to make > >>> your job easier Download IBM WebSphere Application Server > >>> v.1.0.1 based on Apache Geronimo > >>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057& > >>> dat=121642 > >>> _______________________________________________ > >>> Gamedevlists-windows mailing list > >>> Gam...@li... > >>> https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > >>> Archives: > >>> http://sourceforge.net/mailarchive/forum.php?forum_id=555 > >>> > >> > >> ------------------------------------------------------------------------- > >> Using Tomcat but need to do more? Need to support web services, security? > >> Get stuff done quickly with pre-integrated technology to make your job > >> easier > >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > >> _______________________________________________ > >> Gamedevlists-windows mailing list > >> Gam...@li... > >> https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > >> Archives: > >> http://sourceforge.net/mailarchive/forum.php?forum_id=555 > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > Gamedevlists-windows mailing list > > Gam...@li... > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > Archives: > > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > > > > -- > Alen > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > |