Can't debug .net core unit tests


I'm loving Rider so far and want to use it as my main development driver but one major issue that's keeping me from using it is the inability to debug unit tests.  I'm putting a breakpoint in the beginning of my XUnit test method, right clicking on the test (either via test explorer or the code method itself), select "Debug Unit Test".  

The unit test executes and I see it loaded the test suite in the debug window, but the test executes (passes or fails as expected) without ever hitting my breakpoint.

Should debugging unit tests with .net core be working yet or is this still on the TODO list?


Make sure the "debugType" is set to "portable" in project.json. This is required for .NET Core debugging. Rider will prompt for this when doing "normal" debugging, but doesn't prompt when debugging a test.



Yep, that was it!



Thanks, this worked for me too.

Since I'm still on NuGet 2, I had to change the setting in my project's csproj file:


Please sign in to leave a comment.