Breakpoint at the start of test method in test project. Start debugging test project. Breakpoint in web api action method. Right click on webapi project and go to Debug -> Start new instance.
When the api call is made, the breakpoint in the action method will get hit. Give that a go. I do that in VS2019 and it is working. On Sat, Nov 27, 2021 at 4:30 PM Greg Keogh <gfke...@gmail.com> wrote: > Howdy, I have a VS2022 solution containing a .NET 6 Web Api project and an > MS Test project to drive it. You can't hit F5 and run both the web app and > tests in the debugger at the same time. > > Web searches produce no useful suggestions other than using "dotnet test" > from the command line while the web app is debugging (which works, but is > just a workaround). I could run two VS instances at the same time, but that > seems stupid (is it?). > > Has anyone got a technique for debugging this combination? > > *Greg K* >