You should now be able to debug your code running in Linux on Windows using Visual Studio!įor ASP.NET Core applications, there are great instructions to get started, but even after adding a to .Tools.Targets and setting required properties, I was unable to get this working from launchSettings.json. You might see a message about skipping symbols for optimized binaries, but click the Continue button or press F5 to continue. After a short wait, Visual Studio should start downloading symbols for your project.When prompted for the debuggee type, selected “Managed”: Once the host is selected, select the process ID that was printed above: You should see it like in the following screenshot using an automatically generated name. If your container is not discovered automatically, click the Find… button and wait a second or two. Change the Connection type drop-down to “Docker (Linux Container)”.Once loaded, set breakpoints, configure exception settings, etc., and attach to the dotnet process running your tests to debug:. Now go ahead and start Visual Studio 2019 and load your solution if you haven’t already. Please attach debugger to testhost process to continue. This will print some information along with the process ID you’ll need to remember: Starting test execution, please wait.Ī total of 1 test files matched the specified pattern. VSTEST_HOST_DEBUG =1 dotnet vstest /app/MyProject.Tests/bin/Debug/
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |