Jump to content
  • Advertisement
Sign in to follow this  
Kitt3n

vs2003 & automating "Attach to process"

This topic is 4561 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm working on a multiplayer game. Once the game starts ("mygame.exe"), it spawn a "gameserver.exe" and connects to that over tcp/ip. I would like to automatically attach the debugger also to gameserver.exe so any breakpoints I set there are also handled. Currently I'm doing it manually each program start (tools/debug- processes/select my gameserver.exe/attach/ok). Anyone idea on how automate this? It would be great if on mygame-startup, it would also connect to the gameserver without doing anything... ... but I would be happy already if keybinding/macro would do all the 'clicking'. The macro-recorder unfortunately doesn't go further than opening the 'attach to process'-dialog, it doesn't select my process... I noticed you can 'edit' your macro - but I never really used it... Any suggestions on how to do this? Regards

Share this post


Link to post
Share on other sites
Advertisement
You could always add a DebugBreak() call in your code.

That would pop up a message box allowing you to attach a debugger to the process (visual studio would probably be the only option, usually).

Share this post


Link to post
Share on other sites
You could put all the projects for both executables in the same project, then right click on the solution node and "Choose Startup Projects". There you can set up which projects you want to be executed when you F5 or Shift-F5.

If you don't want all the sources in one solution, you can still add just the exe file of the one project to the solution of the other. VS treats .exe files the same as projects for the purpose of a solution. Then you can just do the "Choose Startup Projects" trick again.

Share this post


Link to post
Share on other sites
>then right click on the solution node and "Choose Startup Projects".
>There you can set up which projects you want to be executed when you
>F5 or Shift-F5.
Oh darn - both projects are in the same solution (they share some
libraries) but I only knew you can set one 'startup project' by
rightclicking the project - never noticed you can set several when
rightclicking the root-solution...

When I get back to work tomorrow I'm going to try that - thanks!

rating++ (to both of you)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!