Skip to content

Trying to Debug Xunit test from VS Code GUI return Failed to start Debugger #2467

@haridasnykiel

Description

@haridasnykiel

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   2.1.302
 Commit:    9048955601

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

Host (useful for support):
  Version: 2.1.2
  Commit:  811c3ce6c0

.NET Core SDKs installed:
  1.0.0-preview2-1-003177 [/usr/local/share/dotnet/sdk]
  2.1.301 [/usr/local/share/dotnet/sdk]
  2.1.302 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.1.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

VS Code version: 1.26.1
C# Extension version: 1.15.2

Steps to reproduce

  1. Using xunit version 2.3.1
  2. go to a xunit test
  3. Click Debug test

Expected behavior

Should start the test and stop at break point

Actual behavior

The test does not start and returns the following error:

Failed to start debugger: "System.ArgumentException: '' is not a valid version string.
Parameter name: value
  at NuGet.Versioning.SemanticVersion.Parse (System.String value) [0x0001c] in <04a0e44c93c94c2c97599be99a458fb6>:0 
  at OmniSharp.Services.DotNetCliService.GetVersion (System.String workingDirectory) [0x00011] in <c228582629e34359bfdbc0fc855c1d2f>:0 
  at OmniSharp.DotNetTest.TestManager.Create (Microsoft.CodeAnalysis.Project project, OmniSharp.Services.IDotNetCliService dotNetCli, OmniSharp.Eventing.IEventEmitter eventEmitter, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) [0x0000c] in <f41b72fbbade494ebe7837c7b221ccb3>:0 
  at OmniSharp.DotNetTest.TestManager.Start (Microsoft.CodeAnalysis.Project project, OmniSharp.Services.IDotNetCliService dotNetCli, OmniSharp.Eventing.IEventEmitter eventEmitter, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) [0x00000] in <f41b72fbbade494ebe7837c7b221ccb3>:0 
  at OmniSharp.DotNetTest.Services.BaseTestService.CreateTestManager (System.String fileName) [0x00011] in <f41b72fbbade494ebe7837c7b221ccb3>:0 
  at OmniSharp.DotNetTest.Services.DebugTestService.Handle (OmniSharp.DotNetTest.Models.DebugTestGetStartInfoRequest request) [0x00007] in <f41b72fbbade494ebe7837c7b221ccb3>:0 
  at OmniSharp.Endpoint.Exports.RequestHandlerExportHandler`2[TRequest,TResponse].Handle (TRequest request) [0x00000] in <c228582629e34359bfdbc0fc855c1d2f>:0 
  at OmniSharp.Endpoint.EndpointHandler`2+<HandleSingleRequest>d__18[TRequest,TResponse].MoveNext () [0x0008a] in <c228582629e34359bfdbc0fc855c1d2f>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <f3f2aa82c3a04d48845485ce37124803>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <f3f2aa82c3a04d48845485ce37124803>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <f3f2aa82c3a04d48845485ce37124803>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <f3f2aa82c3a04d48845485ce37124803>:0 
  at OmniSharp.Endpoint.EndpointHandler`2+<Process>d__16[TRequest,TResponse].MoveNext () [0x0024b] in <c228582629e34359bfdbc0fc855c1d2f>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <f3f2aa82c3a04d48845485ce37124803>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <f3f2aa82c3a04d48845485ce37124803>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <f3f2aa82c3a04d48845485ce37124803>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <f3f2aa82c3a04d48845485ce37124803>:0 
  at OmniSharp.Stdio.Host+<HandleRequest>d__15.MoveNext () [0x0010d] in <19355510af164339b7bccd4ca09bc44c>:0 "

FYI - the tests work when running them from terminal.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions