-
Notifications
You must be signed in to change notification settings - Fork 676
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
After single test debug, Omnisharp "crashes" silently #1794
Comments
Hi! My apologies for taking so long to reply. Could you provide your full OmniSharp Log when this happens? Also, does this happen with any test that you execute? Finally, could you try the latest beta release of C# for VS Code? You can follow the instructions here to install the latest. |
I can confirm that csharp-1.13.0-beta4.vsix resolves this issue. |
Excellent! Thanks for letting us know. |
Sorry for the delay on my part as well. Thanks @tphillips, I'll give that a try. |
@falquan : Sounds good. Let me know me know if it still repros. I just pushed 1.13-beta5. |
I am experiencing the same issue. Environment
VSCode: 1.19.3 Steps to reproduce:
Expected behavior
Actual behavior
{
"MessageType": "TestExecution.StatsChange",
"Payload": {
"NewTestResults": [],
"TestRunStatistics": {
"ExecutedTests": 0,
"Stats": {}
},
"ActiveTests": [
{
"Properties": [
{
"Key": {
"Id": "TestCase.FullyQualifiedName",
"Label": "FullyQualifiedName",
"Category": "",
"Description": "",
"Attributes": 1,
"ValueType": "System.String"
},
"Value": "TestName"
},
{
"Key": {
"Id": "TestCase.ExecutorUri",
"Label": "Executor Uri",
"Category": "",
"Description": "",
"Attributes": 1,
"ValueType": "System.Uri"
},
"Value": "executor://MSTestAdapter/v2"
},
{
"Key": {
"Id": "TestCase.Source",
"Label": "Source",
"Category": "",
"Description": "",
"Attributes": 0,
"ValueType": "System.String"
},
"Value": "/FullPathToDLL.dll"
},
{
"Key": {
"Id": "TestCase.CodeFilePath",
"Label": "File Path",
"Category": "",
"Description": "",
"Attributes": 0,
"ValueType": "System.String"
},
"Value": "/FullPathToCSFile.cs"
},
{
"Key": {
"Id": "TestCase.DisplayName",
"Label": "Name",
"Category": "",
"Description": "",
"Attributes": 0,
"ValueType": "System.String"
},
"Value": "TestName"
},
{
"Key": {
"Id": "TestCase.Id",
"Label": "Id",
"Category": "",
"Description": "",
"Attributes": 1,
"ValueType": "System.Guid"
},
"Value": "adab9476-82ab-17ad-4bf9-fd4904a82d41"
},
{
"Key": {
"Id": "TestCase.LineNumber",
"Label": "Line Number",
"Category": "",
"Description": "",
"Attributes": 1,
"ValueType": "System.Int32"
},
"Value": 50
},
{
"Key": {
"Id": "MSTestDiscoverer.TestClassName",
"Label": "ClassName",
"Category": "",
"Description": "",
"Attributes": 1,
"ValueType": "System.String"
},
"Value": "FullClassName"
},
{
"Key": {
"Id": "TestObject.Traits",
"Label": "Traits",
"Category": "",
"Description": "",
"Attributes": 5,
"ValueType": "System.Collections.Generic.KeyValuePair`2[[System.String],[System.String]][]"
},
"Value": []
}
]
}
]
}
}
|
Is there a workaround available for this? I think this issue is causing me problems too. Note: Restarting Omnisharp through Ctr+Shift+P The Omnisharp log reads:
Lots of lines that seemed irrelevant snipped
EDIT: Just updated the plugin to version 1.14.0, but the problem persists.
And then only when an exception is thrown in |
@gregg-miskelly: Does @Ghostbird's last edit give you ideas? If it really is related to when exceptions happen at runtime, maybe this is a debugger issue? |
@DustinCampbell do you have any idea what @Ghostbird Two questions --
|
@gregg-miskelly: |
Ah. In that case @Ghostbird you can ignore my first question, though the second question would still be interesting. Dustin, a few more questions --
|
|
@gregg-miskelly |
@DustinCampbell is there an easy way for Ghostbird to attach a mono debugger to OmniSharp to see if this reveals something more useful? @Ghostbird can you check whatever system logs you have to see if there is any information on what is killing Omnisharp or why? If you aren't sure how to do this, I can do some looking around if you tell me what OS you are on. |
Same issue here. It's a show stopper for me I think. Nothing stands out in omni-sharp logs. I see the test complete, and then all omnisharp functionality is halted. If I restart omnisharp, the status at the bottom will be a flame and say "Running", usually it will have a flame and the solution file name. Only way to get it running again is to quite vscode.
|
Same issue for me as well. As mentioned above, just restarting OmniSharp does not help, but it seems that CTRL+Shift+P |
It seems that if the unit test has a failure,
|
I'm also bumping into this. As others have said, using I tried to track down in what cases it reproduces, but it is kind of random. Sometimes you can debug multiple times in a row and it works just fine. Most of the time, a single debugging session is enough to crash it, especially if you inspect variables.
|
My work around has been to exit the debug session (click the red box)
before the unit test completes.
…On Sat, Aug 11, 2018, 7:52 AM seanamosw ***@***.***> wrote:
I'm also bumping into this. As others have said, using Restart OmniSharp
from the command palette doesn't get OmniSharp working again. You have to
at minimum use Reload Window to get it working again.
I tried to track down in what cases it reproduces, but it is kind of
random. Sometimes you can debug multiple times in a row and it works just
fine. Most of the time, a single debugging session is enough to crash it,
especially if you inspect variables.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1794 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGWU7zgkMBRPlYk3GbgNzVYDX7GmDdwTks5uPu-9gaJpZM4P-bOV>
.
|
I'm seeing the same thing. Reload window is required to bring it back.
Using vscode version
|
👍 for getting this fixed. This is a major annoyance. Any additional steps I could run to help debug this?
|
Issue still exists in 1.16.1. Do you need any further info\help for fixing this? |
Yes, they need an example project to repro this. If you're about to make
one that would be awesome!
…On Wed, Sep 19, 2018, 3:15 AM ognjenkurtic ***@***.***> wrote:
Issue still exists in 1.16.1. Do you need any further info\help for fixing
this?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1794 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGWU7z3pT60_3TAGzs2HF-0171ypxPcFks5uchk2gaJpZM4P-bOV>
.
|
@ognjenkurtic @RoarkeRandall I used to be able to reproduce this on 15.2, but am no longer able on 16.1. A repro project would be great! |
Is there any news to fix this omnishit bug? |
@vintzl unless you're a paying customer... maybe tone it down? |
@vintzl we all know the "problems" we have with Omnisharp here and are frustrated with the lack of support but, that doesn't give you the right to come here and not be polite with others. I would suggest you to have a look on the GitHub's and specifically this project Code of Conduct and stop this sort of comments, please. |
I am a "Libre User Worker". So I use as much as I can Libre and Open source software, and I have contributed in more than 10 projects (bug, codes, doc, etc…). Microsoft is bigger than any of these enterprises, or volunteers, behind any of these projects in which I contributed, and yet some of them provide support, but here, with Microsoft, there is no support… You want to use an IDE with a decent support for the C# stack? Well, you have to use Visual Studio on Windows. But wait, Windows 10 is, in itself, a bloatware that spies while annoying you with ads, even if you paid the license… Not to mention Visual Studio for Mac that is as buggy as MonoDevelop… As to MonoDevelop on Linux, it is almost unusable because of the debugger issue… And of course, Microsoft do not propose Visual Studio outside Windows (certainly, they develop it deeply coupled with Windows)… I would have bought if only it was available on Linux, but no… But why and how I get stuck in such wired situation? Well because Microsoft said that you can develop .NET Core and C# apps with Vscode on Linux and Mac… They write this on their website and docs, tell this in a lot of their conferences. But they lied. But I trusted them, and I start to develop not so big projects (~150 000 lines of code) with Vscode and Omnisharp. At first, Omnisharp was pretty stable. And I remember when the review of the extension were very positive and the mark was around 4.8/5. But slowly, I find more and more troubles to develop with Omnisharp, because it became evermore buggy. Welcome OmniBUGs. At the same time, the mark went slowly from 4.8, to 4.5, to 4, and now 3.5/5 with 10.5M reviews… It sucks for something developed by Microsoft. Even the Python extension developed by Microsoft seems better with a mark of 4.5 for 32.8M reviews. Insane, Microsoft do a better work with an extension for a dynamic language (that are know to be more difficult) than their own language and stack (Blazor support is very sketchy)… Even worse, some of the bugs are very old, and prevent you to use Omnisharp. And now? I have to restart, randomly, Omnisharp, or quit Vscode and reopen it to bring back Omnisharp and the debugger. How many times per day? Well around 20 times… It takes at every turn minutes to load all my projects. And I remember each time what Microsoft write and say : "You can develop with Linux", "Cross-platform software". Microsoft lied, and put a lot of Omnisharp users in Vscode in troubles. Bugs are not fixed, there is no support, no real alternative and I should not say anything? Well I disagree with this. Sorry, but this Omnisharp is a shame. it shouldn't even be marked as stable. |
@vintzl @armitagemderivitec Generally, I try to stay out of conflict in Github (and the Internet in general), but I feel I need to say something. I, along with many others, get notifications for this particular issue. I am interested in knowing when it's resolved, but these types of comments that you are making are not in service of that goal. It sounds like you both have strong opinions about the state of .NET development with macOS. Having and expressing opinions is fine. However, this thread (and rarely Github issues in general) is not the appropriate place for that. I would recommend Twitter, Reddit, blogging, etc. for a long-form discussion of your particular grievances. Furthermore, please consider the feelings of the many maintainers who contribute to this project and many others you probably use. For example, I would never consider walking into a React thread and saying, "Yeah, this library is unusable. I use Vue; it's incredible." That simply shows a disregard for the thankless effort many people put into this software which we often pay $0/year for. |
I proposed adding some extra logging. @JoeRobich do you think this would give more information? In general I don't get bitten by this, because I stop debugging before finishing the test run. I trained myself to work around this issue this way. Hopefully this little trick helps for others as well. |
This is literally the only issue I have with using C# in VS Code. If you guys manage to fix this then I will not have to reload it every 5 minutes. You will save my life :) |
|
Still same problem, VS Code at Apple M1, for years ... Hey developers, please help to us :) |
ubuntu 20, vscode 1.60, dotnet 5. As I posted on a related issue: I can often (but not always) prevent a crash by disabling the "All Exceptions" and "User-Unhandled Exceptions" breakpoints. When those are disabled, it crashes less often. When those are enabled - and I hit a breakpoint, or step through code - and step over a throw new FooException(), it'll proceed to the end of the test, then crash (a Mono crash like described above.) |
I have found an easier way to write the command once. Basically you create a task and it waits until you attach debugger. Check this excellent article. However I think that it could be automated even more so that you only have to run task and debugger will be attached. I'll try to tinker a bit and eventually let you know since that bug is probably going to stay for a few more years. |
That's really depressing 😭. Debugging C# is a nightmare, and has been for years. Most devs spend a double-digit percentage of their time in the debugger. Please prioritise these debugging-related bugs. Can someone from the team please update us? 🙏 |
I've lost track of all the related issues so unsure where to post anymore. I'm choosing this one as it has the most activity. I can now get fairly consistent crash logs - I know what to look for. I still don't know why or how they occur.
Sometimes this happens even when the test passes - if I let it run it'll crash anyway. So I'm no longer certain it's a test error that causes this. It looks like a mismatch between the debugger and the source (the line mentioned in the log is blank). I hope that log is helpful. If anyone else notices this pattern, or other patterns, please post here so we can assist in tracking down this problem. |
I've one unit test which crash every time. |
@msigut If you have one test that consistently crashes then you are luckier than the rest of us, because this bug is hard to reproduce. Check whether the crash is always for the same reason. If so consider posting your crash log here so the devs can look at it? |
Helps this? ....
{ |
Here's an example that always crashes for me. I'm on Mac OS 12.2, on an M1 Mac, with vscode 1.63.2, dotnet 3.1.416 for x86_64 installed from here, and Mono 6.12.0.122. I open Sample.zip in vscode, and run Then I open SampleTests.cs, click Debug All Tests, and press continue when it pauses on the exception. After it's done, Intellisense stops working, and omnisharp is no longer running. |
Some feedback: since upgrading to the net6-based o#, I no longer have debugging crashes. 😄 |
It's much faster and the debugging crashes are gone! 👍 |
Still experiencing the issue on OmniSharp |
#4021 related |
This useful comment by @BDisp led to this successful workaround... Kill the current process in the teardown and omnisharp no longer crashes. This seems to have solved my problem without any side effects
|
There have been lots of improvements since this issue was opened. Please open a new issue with logs if you are still running into this. |
Environment data
dotnet --info
output:VS Code version: 1.17.2 b813d12980308015bcd2b3a2f6efa5c810c33ba5
C# Extension version: 1.12.1
Xunit: 2.2.0
Steps to reproduce
Debug Test
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):The text was updated successfully, but these errors were encountered: