Reputation: 21
Summary:
The problem is when I launch an app which has Debug.Launch()
with a new instance of visual studio 2022 [17.4.3] or visual studio 2022 Preview [17.5.0 Preview 2.0] it hangs forever. Same for visual studio 2019 [16.11.22]. I originally had it in source generator [build time]. So then I tested it with a console application as well to see if I get the same result (which I do get).
Steps:
Create Console App.
Add the following lines :
#if DEBUG
if(!Debugger.IsAttached) Debugger.Launch();
#endif
Build the solution (in Debug).
Start exe from debug folder.
Try to open with new instance of visual studio 2022. Visual studio hangs forever.
I also opened the following ticket.
Already tried the following:
Upvotes: 2
Views: 2268
Reputation: 21
After installing an older version of visual studio (Visual Studio 2022 [17.3.6] Professional) I could open open the console.exe with Debug.Launch()
. And the hanging was resolved.
Since you can't install an older community version of visual studio you need to install a professional version.
You can download it from here Microsoft release history.
Upvotes: 0