After single test debug, Omnisharp "crashes" silently
See original GitHub issueEnvironment data
dotnet --info
output:
.NET Command Line Tools (2.0.0)
Product Information:
Version: 2.0.0
Commit SHA-1 hash: cdcd1928c9
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.12
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.17.2 b813d12980308015bcd2b3a2f6efa5c810c33ba5 C# Extension version: 1.12.1 Xunit: 2.2.0
Steps to reproduce
- Open a solution folder in VSCode
- Navigate to a test in the project
- Choose to
Debug Test
- Allow test to execute to finish (F5)
- Attempt to debug or run test again OR attempt to trigger Intellisense
Expected behavior
After test has run, OmniSharp is able to run and debug tests, and provides Intellisense from open project windows.
Actual behavior
After test has run, OmniSharp will no longer be able to run or debug a test, nor provide intellisense until restart of VSCode.
The following is the output in the OmniSharp Debug Log after turning on logging with "omnisharp.loggingLevel": "debug"
(note that classnames and file paths were find/replaced, and base 64 removed – can provide if needed):
[dbug]: OmniSharp.DotNetTest.VSTestManager
read: {"MessageType":"TestExecution.StatsChange","Payload":{"NewTestResults":[{"TestCase":{"Properties":[{"Key":{"Id":"TestCase.FullyQualifiedName","Label":"FullyQualifiedName","Category":"","Description":"","Attributes":1,"ValueType":"System.String"},"Value":"MyClass.MyTestMethod (cef3ff6adf55e367891e1369e8ce731ad73a47a7)"},{"Key":{"Id":"TestCase.ExecutorUri","Label":"Executor Uri","Category":"","Description":"","Attributes":1,"ValueType":"System.Uri"},"Value":"executor://xunit/VsTestRunner2"},{"Key":{"Id":"TestCase.Source","Label":"Source","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"/Users/greg/Code/MySolution/test/MyTestProject/bin/Debug/netcoreapp2.0/MyTestProject.dll"},{"Key":{"Id":"TestCase.CodeFilePath","Label":"File Path","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"/Users/greg/Code/MySolution/test/MyTestProject/EndpointTests.cs"},{"Key":{"Id":"TestCase.DisplayName","Label":"Name","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"MyClass.MyTestMethod"},{"Key":{"Id":"TestCase.Id","Label":"Id","Category":"","Description":"","Attributes":1,"ValueType":"System.Guid"},"Value":"ab9c8bad-66f9-eb4d-a7e1-7dde43a5d7cf"},{"Key":{"Id":"TestCase.LineNumber","Label":"Line Number","Category":"","Description":"","Attributes":1,"ValueType":"System.Int32"},"Value":91},{"Key":{"Id":"XunitTestCase","Label":"xUnit.net Test Case","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"Xunit.Sdk.XunitTestCase, xunit.execution.{Platform}:`/* SNIP Base64 */`"},{"Key":{"Id":"TestObject.Traits","Label":"Traits","Category":"","Description":"","Attributes":5,"ValueType":"System.Collections.Generic.KeyValuePair`2[[System.String],[System.String]][]"},"Value":[{"Key":"Type","Value":"Not-Unit"},{"Key":"Type","Value":"EndToEnd"},{"Key":"Type","Value":"Not-Integration"},{"Key":"Type","Value":"Not-Performance"},{"Key":"Category","Value":"Purpose-Not-Unit"},{"Key":"Category","Value":"Purpose-EndToEnd"},{"Key":"Category","Value":"Purpose-Not-Integration"},{"Key":"Category","Value":"Purpose-Not-Performance"}]}]},"Attachments":[],"Messages":[],"Properties":[{"Key":{"Id":"TestResult.Outcome","Label":"Outcome","Category":"","Description":"","Attributes":0,"ValueType":"Microsoft.VisualStudio.TestPlatform.ObjectModel.TestOutcome, Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"},"Value":2},{"Key":{"Id":"TestResult.ErrorMessage","Label":"Error Message","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"Assert.Equal() Failure\nExpected: Accepted\nActual: BadRequest"},{"Key":{"Id":"TestResult.ErrorStackTrace","Label":"Error Stack Trace","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":" at MyClass.<MyTestMethod>d__6.MoveNext() in /Users/greg/Code/MySolution/test/MyTestProject/EndpointTests.cs:line 96\n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()"},{"Key":{"Id":"TestResult.DisplayName","Label":"TestResult Display Name","Category":"","Description":"","Attributes":1,"ValueType":"System.String"},"Value":"MyClass.MyTestMethod"},{"Key":{"Id":"TestResult.ComputerName","Label":"Computer Name","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"am-mbp-016"},{"Key":{"Id":"TestResult.Duration","Label":"Duration","Category":"","Description":"","Attributes":0,"ValueType":"System.TimeSpan"},"Value":"00:00:12.2100000"},{"Key":{"Id":"TestResult.StartTime","Label":"Start Time","Category":"","Description":"","Attributes":0,"ValueType":"System.DateTimeOffset"},"Value":"2017-10-18T14:51:01.246646-07:00"},{"Key":{"Id":"TestResult.EndTime","Label":"End Time","Category":"","Description":"","Attributes":0,"ValueType":"System.DateTimeOffset"},"Value":"2017-10-18T14:51:01.246651-07:00"}]}],"TestRunStatistics":{"ExecutedTests":1,"Stats":{"Failed":1}},"ActiveTests":[]}}
/Users/greg/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp/run: line 44: 16109 Killed: 9 "${MONO_CMD}" --assembly-loader=strict --config "${CONFIG}" "${OMNISHARP}" "$@"
Issue Analytics
- State:
- Created 6 years ago
- Reactions:43
- Comments:83 (13 by maintainers)
Top Results From Across the Web
Omnisharp silently crashes when working with docker
This only fails when launching in Docker or from the cli, if I run the app through vscode (something I don't want to...
Read more >Omnisharp VsCode Attaching to remote processes - microestc
NET Core command line debugger) onto the server. The easiest way to do this is by running the following command. Replace '~/vsdbg' with...
Read more >Winrt App Crashes In Release Build But Not Debug - ADocLib
After my upgrade to RS4 deploying from VS and trying to run the app at all ... Commit SHA1 After single test debug...
Read more >Bug listing with status RESOLVED with resolution OBSOLETE ...
systemPrefs with at least two files" status:RESOLVED resolution:OBSOLETE severity: ... Bug:320895 - "dev-perl/Debug-Client fails tests" status:RESOLVED ...
Read more >Release Notes - Ranorex
... case of a test plan with a skip constraint that was skipping just a single ... Fixed an issue with crashing or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@galvesribeiro This is a complicated issue and we’re working with the mono and MSBuild teams to investigate.
Same issue for me as well. As mentioned above, just restarting OmniSharp does not help, but it seems that <kbd>CTRL</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>
> Reload Window
does restore functionality. A little quicker than quitting VS Code altogether and relaunching.