I have a lobby application which invokes a client-application (think: League of Legends). They're two separate applications and the first invokes the second from itself - how can I get Visual Studio to debug this application as well?
You simply need to launch a separate Visual Studio, and then use Debug | Attach to Process to attach to the other process. The trick is using two Visual Studios.
MessageBox.Show("Attach now!");
in the start of my Main()
method when I needed to attach to debug the startup code. Other times, it doesn't matter. –
Fourgon Debug -> Attach to process
Select the executable from the list.
Make sure to select the right code type with the Select.. button.
Have you tried Debug -> Attach to Process
?
Ref: http://msdn.microsoft.com/en-gb/library/vstudio/3s68z0b3.aspx
Like Matthew said Debug|Attach to process. If the other application is in a different service you might also want to look into remote debugging
The other answers are correct, but I just wanted to add another approach:
If you add both projects to a single Visual Studio Solution, you could:
Right-click the solution -> Properties -> Common Properties -> Startup Project
There you would select Multiple startup projects
and select both the Lobby and the Client applications.
That way you can debug several VS projects without having to run several VS instances.
© 2022 - 2024 — McMap. All rights reserved.