sar / free-omnisharp-vscode-LTS

LTS Fork: C# debugging support for Codium, Code-Server & GitPod powered by OmniSharp and Samsung/netcoredbg. Release targets long-term stability and usability.
https://open-vsx.org/extension/muhammad-sammy/csharp
Other
1 stars 0 forks source link

`netcoredbg` release `1.2.0-825` fails to `--attach` to running dotnet process `unhandled exception thrown` #1

Open sar opened 2 years ago

sar commented 2 years ago

Issue

netcoredbg --attach fails to tracks process execution for debugging. Unhandled exception error thrown in web inspector console as extension fails silently. Rolling back to netcoredbg ~ 1.20.786 resolves this issue.

Environment data

dotnet --info output:

➜  free-omnisharp-vscode git:(ccb5b789) ✗ dotnet --info
.NET SDK (reflecting any global.json):
 Version:   5.0.401
 Commit:    4bef5f3dbf

Runtime Environment:
 OS Name:     debian
 OS Version:  10
 OS Platform: Linux
 RID:         debian.10-x64
 Base Path:   /usr/share/dotnet/sdk/5.0.401/

Host (useful for support):
  Version: 5.0.10
  Commit:  e1825b4928

.NET SDKs installed:
  2.1.818 [/usr/share/dotnet/sdk]
  3.1.413 [/usr/share/dotnet/sdk]
  5.0.401 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.30 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.30 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.19 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.10 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.30 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.19 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.10 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

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

VS Code version: ~1.60.0 C# Extension version: csharp-1.23.15

Traces

Omnisharp Log

[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/workspace/dotnet-example.Tests.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/workspace.Tests/dotnet-example.Tests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: dotnet-example
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: dotnet-example.Tests
Can't find custom attr constructor image: /workspace/dotnet-example/bin/Debug/net5.0/dotnet-example.dll mtoken: 0x0a000001 due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
[info]: OmniSharp.Roslyn.CSharp.Services.Diagnostics.CSharpDiagnosticWorkerWithAnalyzers
        Solution initialized -> queue all documents for code analysis. Initial document count: 162.

Steps to reproduce

Attempt to attach to a running dotnet process with the launch.json configuration.

    "configurations": [
        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach"
        }
    ]
sar commented 2 years ago

Downgrade netcoredbg == 1.2.0-786-LTS applied in commit d328bba6d058e017088a61d3e55801d9aa50f5d7 resolves as a workaround.

Tracking issues for 1.2.0-825 as unstable build.