Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

How Do I Debug xUnit.NET Tests in Monodevelop? #8286

Open
vintzl opened this issue Jul 26, 2019 · 6 comments
Open

How Do I Debug xUnit.NET Tests in Monodevelop? #8286

vintzl opened this issue Jul 26, 2019 · 6 comments

Comments

@vintzl
Copy link

vintzl commented Jul 26, 2019

Monodevelop Version: 7.8.4.1-0xamarin6+debian10b1
How can I debug Unit Tests with MonoDevelop?

@usr-sse2
Copy link

@vintzl, please describe your problem with more details. Before migrating to NUnit I used debugging xUnit tests in MonoDevelop or VS for Mac, and it worked (although not always).

@vintzl
Copy link
Author

vintzl commented Jul 26, 2019

Well, I cannot see nowhere, in the UI, how to clearly debug them.

If I do "right click" in one of the Unit Tests, I have no contextual menu allowing debugging…

Finally, if I try to debug all of them, from the "play button" , no break points are respected, and no test result is return, as if MonoDevelop just builds them.

@usr-sse2
Copy link

It seems that you are trying to debug a .NET Core project on Linux. Microsoft .NET Core debugger vsdbg is included only in Visual Studio for Mac because of its license. This issue is not specific to unit tests. You should either convert your solution to .NET Framework and use Mono debugger, or use Samsung .NET Core debugger extension (which doesn't work for me – it can't even start dotnet, because it tries to execute dotnet-/usr/local/share/dotnet/dotnet command).

@vintzl
Copy link
Author

vintzl commented Jul 26, 2019

Thanks.

It seems that you are trying to debug a .NET Core project on Linux. Microsoft .NET Core debugger vsdbg is included only in Visual Studio for Mac because of its license. This issue is not specific to unit tests. You should either convert your solution to .NET Framework and use Mono debugger, or use Samsung .NET Core debugger extension (which doesn't work for me – it can't even start dotnet, because it tries to execute dotnet-/usr/local/share/dotnet/dotnet command).

And what about:
sudo ln -s /usr/share/dotnet/dotnet /usr/local/share/dotnet/dotnet

I have found this issue:

Now I am in trouble :s My project is too big for VSCode and its OmniSharp (lags, slow, crashes…) :s

@usr-sse2
Copy link

usr-sse2 commented Jul 26, 2019

No, the problem is not /local/ (I was writing from memory). The problem is that it runs

dotnet /usr/share/dotnet/dotnet

instead of just

/usr/share/dotnet/dotnet

So it’s considering /usr/share/dotnet/dotnet as a dotnet subcommand, and dotnet tries to find an executable named

dotnet-/usr/share/dotnet/dotnet

@vintzl
Copy link
Author

vintzl commented Sep 6, 2019

@ usr-sse2 I have successfully made the Samsung debugger working (.NET Core ≥ 2.1).
Question:

  • Why not making this debugger part of MonoDevelop?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants