-
Notifications
You must be signed in to change notification settings - Fork 685
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
Unit Test Debugging with Syntax Error Requires VS Code Restart #2400
Comments
@xcellsoft The double , triple times diagnostics is coming because we are not disposing the event listeners properly in the extension, and the problem with the debugger already started is coming because the exceptions are not being handled properly. I am working on it and a PR will be out soon. Thank you for taking time to file the issue. |
This will save allot of time, can’t wait. Thanks |
What is the appropriate way to get this fix? I see that setting "omnisharp.path": "latest" pulls down recent builds, looks like today it's 1.31.2-beta.98, how does this correlate with commits to master and/or what is the best way to get this patch to test it out? |
@xcellsoft Just setting "omnisharp.path": "latest" and restarting the omnisharp server will make the debugger work for you. However you will see duplicate logs if the debugger failed initially. The change for that has been merged to master in omnisharp-vscode. We are in talks of doing a beta release. Until then you can follow the steps here to create a vsix and then install it. |
"Just setting "omnisharp.path": "latest" and restarting the omnisharp server will make the debugger work for you. However you will see duplicate logs if the debugger failed initially" Didn't work for me. |
I was having same issue with MSTEST |
I would recommend opening a new issue rather than commenting on a closed issue. |
LiveShare is not installed. my VSCODE version is Version: 1.28.2. I restored back to default. didn't help |
Please open a new issue so that folks can try and help investigate. |
Environment data
dotnet --info
output:.NET Core SDK (reflecting any global.json):
Version: 2.1.301
Commit: 59524873d6
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17134
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.301\
Host (useful for support):
Version: 2.1.1
Commit: 6985b9f684
.NET Core SDKs installed:
2.1.3 [C:\Program Files\dotnet\sdk]
2.1.4 [C:\Program Files\dotnet\sdk]
2.1.101 [C:\Program Files\dotnet\sdk]
2.1.103 [C:\Program Files\dotnet\sdk]
2.1.200 [C:\Program Files\dotnet\sdk]
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.300 [C:\Program Files\dotnet\sdk]
2.1.301 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
VS Code version: 1.24.1
C# Extension version: .
vscode\extensions\ms-vscode.csharp-1.15.2.omnisharp\1.30.1\OmniSharp.exe
Steps to reproduce
Create a fresh xunit application using
dotnet new xunit
, then open the unit test and create a syntax error (this example missing semicolon after assert.true) and click debug:
Expected behavior
Syntax error returned, fix error and debug again.
Actual behavior
Syntax error is returned but clicking debug shows two debuggers running and then an error that the debugger is already started. Clicking debug again shows 3 debuggers running and same error, then so on so forth.
.NET Test Log Output
Error Message:
Failed to start debugger: "System.InvalidOperationException: Debug session already started.\r\n at OmniSharp.DotNetTest.DebugSessionManager.VerifySession(Boolean isStarted)\r\n at OmniSharp.DotNetTest.DebugSessionManager.StartSession(TestManager testManager)\r\n at OmniSharp.DotNetTest.Services.DebugTestService.Handle(DebugTestGetStartInfoRequest request)\r\n at OmniSharp.Endpoint.EndpointHandler
2.d__18.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at OmniSharp.Endpoint.EndpointHandler2.<Process>d__16.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at OmniSharp.Stdio.Host.<HandleRequest>d__15.MoveNext()"
The text was updated successfully, but these errors were encountered: