Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to debug unit test #3896

Closed
mrj001 opened this issue Jul 7, 2020 · 2 comments
Closed

unable to debug unit test #3896

mrj001 opened this issue Jul 7, 2020 · 2 comments

Comments

@mrj001
Copy link

mrj001 commented Jul 7, 2020

Create a new solution:
$ dotnet new console -n MyConsole
$ dotnet new xunit -n test
$ dotnet add test/test.csproj reference MyConsole/MyConsole.csproj
$ dotnet sln program.sln add MyConsole/MyConsole.csproj
$ dotnet sln program.sln add test/test.csproj

Add this to Program.cs in MyConsole folder:

public static bool DoSomething()
{
return false;
}

Change Test1 to:

[Fact]
public void Test1()
{
Assert.True(Program.DoSomething());
}

$ dotnet build

succeeds
Launch vscode
Open the folder
Generate assets for build & debug
Select program to launch
Open the UnitTest1.cs file. Click “debug test”
get
Error Processing Launch options at field: Program

VS Code version: Code 1.46.1 (cd9ea64, 2020-06-17T21:17:14.222Z)
OS version: Darwin x64 19.5.0

System Info
Extensions (3)

This is the output of dotnet --info:

.NET SDK (reflecting any global.json):
Version: 5.0.100-preview.6.20310.4
Commit: 16d29b9349

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
Base Path: /Users/mj/Documents/develop/runtime/.dotnet/sdk/5.0.100-preview.6.20310.4/

Host (useful for support):
Version: 5.0.0-preview.6.20305.6
Commit: 4ba9ecaabd

.NET SDKs installed:
5.0.100-preview.6.20310.4 [/Users/mj/Documents/develop/runtime/.dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.0-preview.6.20309.8 [/Users/mj/Documents/develop/runtime/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.0-preview.6.20305.6 [/Users/mj/Documents/develop/runtime/.dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download

@gregg-miskelly
Copy link
Contributor

This is a duplicate of #3459

@mrj001
Copy link
Author

mrj001 commented Jul 15, 2020

I don't understand how this is a duplicate.

Issue #3459 is two years old. This was working for me up until a few weeks ago.

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

No branches or pull requests

2 participants