Omnisharp-vscode: Error processing 'variables' request. Unknown Error: 0x8000211d

Created on 23 Jul 2020  路  16Comments  路  Source: OmniSharp/omnisharp-vscode

Issue Description

When I set a breakpoint and try to watch the value of a variable I get the following message
Error processing 'variables' request. Unknown Error: 0x8000211d

Steps to Reproduce

dotnet new web --no-https -n api
dotnet new sln
dotnet sln add api

``` c#
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton(new JsonSerializerOptions()
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
PropertyNameCaseInsensitive = true,
});
}

public void Configure(IApplicationBuilder app, IWebHostEnvironment env, JsonSerializerOptions serializerOptions)
{
    if (env.IsDevelopment())
    {
        app.UseDeveloperExceptionPage();
    }

    app.UseRouting();

    app.UseEndpoints(endpoints =>
    {
        endpoints.MapGet("/", async context =>
        {
            await context.Response.WriteAsync("Hello World!");
        });

        endpoints.MapPost("deposit", async context =>
        {
            var transaction = await context.Request.ReadFromJsonAsync<Transaction>();
            await context.Response.WriteAsync($"Hello World! {transaction.Id} {transaction.Amount} {transaction.Comment}");
        });
    });
}

}
```

dotnet run --project api

Set Breakpoint to see the value of transaction

curl -X POST http://localhost:5000/deposit -H "Content-Type: application/json" -d '{"Id":102,"Amount":200,"Comment":"rent"}'

Expected Behavior

Expected to see an object with this values: '{"Id":102,"Amount":200,"Comment":"rent"}'`

Actual Behavior

The variable show this value: Error processing 'variables' request. Unknown Error: 0x8000211d

Logs

OmniSharp log

Post the output from Output-->OmniSharp log here

C# log

Post the output from Output-->C# here

Environment information

VSCode version: 1.47.2
C# Extension: 1.22.1

Mono Information
OmniSharp using global mono :6.10.0

Dotnet Information
.NET SDK (reflecting any global.json):
Version: 5.0.100-preview.7.20366.6
Commit: 0684df3a5b

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
Base Path: /usr/local/share/dotnet/sdk/5.0.100-preview.7.20366.6/

Host (useful for support):
Version: 5.0.0-preview.7.20364.11
Commit: 53976d38b1

.NET SDKs installed:
3.1.200 [/usr/local/share/dotnet/sdk]
3.1.202 [/usr/local/share/dotnet/sdk]
3.1.300 [/usr/local/share/dotnet/sdk]
3.1.301 [/usr/local/share/dotnet/sdk]
3.1.302 [/usr/local/share/dotnet/sdk]
5.0.100-preview.7.20366.6 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0-preview.7.20365.19 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.16 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.17 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.18 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.19 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.20 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0-preview.7.20364.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

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


Visual Studio Code Extensions

|Extension|Author|Version|
|---|---|---|
|azure-account|ms-vscode|0.8.11|
|csharp|ms-dotnettools|1.22.1|
|file-downloader|mindaro-dev|1.0.0|
|github-vscode-theme|GitHub|1.1.3|
|gitlens|eamodio|10.2.2|
|mindaro|mindaro|0.1.120200723|
|mssql|ms-mssql|1.9.0|
|python|ms-python|2020.7.94776|
|remote-containers|ms-vscode-remote|0.128.0|
|sonarlint-vscode|SonarSource|1.16.0|
|vscode-dapr|ms-azuretools|0.2.1|
|vscode-docker|ms-azuretools|1.4.1|
|vscode-kubernetes-tools|ms-kubernetes-tools|1.2.1|
|vscode-postgresql|ms-ossdata|0.3.0|
|vscode-sanddance|msrvida|3.0.0|
|vscode-solution-explorer|fernandoescolar|0.3.10|
|vscode-sqlite|alexcvzz|0.8.2|
|vscode-yaml|redhat|0.9.1|
|vscodeintellicode|VisualStudioExptTeam|1.2.9|
|vsliveshare|ms-vsliveshare|1.0.2478|
|vsliveshare-audio|ms-vsliveshare|0.1.85|;

Debugger Resolved-Fixed

Most helpful comment

@eestein Thanks. We will work with the VS for Mac team to get the fix deployed there too.

All 16 comments

@gregg-miskelly do you have any insights in to what could be happening here?

@rspaulino Are you still seeing this problem? What version of .NET Core is your app running on?

@gregg-miskelly I just tested again and still happening.

.NET SDK (reflecting any global.json):
 Version:   5.0.100-preview.8.20417.9
 Commit:    fc62663a35

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.15
 OS Platform: Darwin
 RID:         osx.10.15-x64
 Base Path:   /usr/local/share/dotnet/sdk/5.0.100-preview.8.20417.9/

Host (useful for support):
  Version: 5.0.0-preview.8.20407.11
  Commit:  bf456654f9

Screen Shot 2020-09-01 at 8 58 15 PM

Here is the project hope this can help:
ntmp.zip

Thanks. I can reproduce the problem. I will take a look at what is going on.

This is a bug with our handling of decimal types. The issue is already fixed internally, but we haven't pushed it to the extension yet. We were about to insert a new build that has the fix.

@gregg-miskelly great!, thanks.

I am facing the same error. I tried to remove decimal properties just to test what @gregg-miskelly said about the problem and worked.

@gregg-miskelly is there any timeline on the next build with this fix please

@gregg-miskelly I used 1.23.3beta 3 and still had this issue

The same error happens on VS for mac, are you guys related to that one as well? Thanks.

@eestein Thanks. We will work with the VS for Mac team to get the fix deployed there too.

Same happening on VSCode for Windows. App is in .NET 5, how do I get the exception for you guys?

@darkguy2008 are you using the latest vscode and omnisharp. This particular issue was fixed for me on windows and mac.

@darkguy2008 If you are still seeing this using the current C# extension (1.23.6) please open a new issue and include a debugger log. Information about the types of all the variables you have in the current frame would also be useful.

Was this page helpful?
0 / 5 - 0 ratings