question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test debugging does not work on .NET Core 2.0 and xUnit 2.3.0

See original GitHub issue

Environment data

dotnet --info output:

Программы командной строки .NET (2.0.0)

Product Information:
 Version:            2.0.0
 Commit SHA-1 hash:  cdcd1928c9

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.13
 OS Platform: Darwin
 RID:         osx.10.12-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.0.0/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d

VS Code version: 1.15.1 C# Extension version: 1.12.1 xUnit version: 2.3.0-beta4

Steps to reproduce

Create project with any xUnit test and click codelens “debug test” button.

Expected behavior

Test should be runned in debug mode.

Actual behavior

Exception message occurs: An exception occurred while test discoverer 'VsTestRunner' was loading tests. Exception: Object reference not set to an instance of an object.

May be this is connected with this PR https://github.com/OmniSharp/omnisharp-roslyn/issues/944? If so then may you update extension to include this fix?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
DustinCampbellcommented, Nov 7, 2017

@americofreitasjr: Have you tried the latest C# for VS Code 1.13-beta5 release? You can follow the instructions here to install a beta release.

1reaction
leechencommented, Oct 13, 2017

After uninstall 1.13.0-beta2 and reinstall manually, the “reload” icon is finally gone. The debug is working now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

.NET Core 2.0 and xUnit doesn't run - Stack Overflow
Try xunit.analyzers project and run tests which are there. The project you have downloaded xunit.integration should not be run on .Net Core as ......
Read more >
unable to debug tests on visual studio 2022
Unable to debug dotnet core 3.1 test project in visual studio 2022, but I can able to debug dotnet framework 4.8 project which...
Read more >
What NuGet Packages Should I Use? - xUnit
This guide helps you understand which NuGet packages you should use in your projects ... NET Core projects from the command line (with...
Read more >
Unit testing with xUnit in .NET Core - LockTar's Blog
This post is about Unit testing with xUnit in .NET Core. The last few weeks I was working on a new project in...
Read more >
Not runnable: No tests discovered : RIDER-36475
This happens because you are referencing both xUnit and NUnit unit-test frameworks in a number of your projects. Unfortunately it is not as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found