Skip to content

Linux arm 5.0 launch fails with CORDBG_E_MISSING_DEBUGGER_EXPORTS #44745

@gregg-miskelly

Description

@gregg-miskelly

This issue is from dotnet/vscode-csharp#4210. Bug report is from @profix898

Issue Description

After deploying a .NET 5 linux-arm app to a Raspberry Pi 4, debugging fails with CORDBG_E_MISSING_DEBUGGER_EXPORTS (0x80131c4f). This doesn't happen with 3.1.

Steps to Reproduce

  1. I have created a minimal console project with the following content:

RPiDemo.csproj

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net5.0</TargetFramework>
  </PropertyGroup>
</Project>

Program.cs

using System;

namespace RPiDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello RPi!");
        }
    }
}

The project is successfully compiled in VS Code on Win 10 x64 using the locally installed .NET 5 SDK. The project is published for 'linux-arm' and copied to the Raspberry Pi 4 (with Raspian 10, latest version as of today) with the following command:

dotnet publish -c Release -r linux-arm -o ./publish/linux-arm ${workspaceFolder} ; scp -rp -P 2222 ./publish/linux-arm/ root@192.168.81.129:/opt/RPiDemo

I'm essentially following the instructions at https://github.com/OmniSharp/omnisharp-vscode/wiki/Remote-Debugging-On-Linux-Arm (or similar tutorials on the internet).

The project is then launched on the RPi with the 'vsdbg' remote debugger. My launch.json looks like this:

{
    "configurations": [        
        {
            "name": "Launch LOCAL",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "${workspaceFolder}/bin/Debug/net5.0/RPiDemo.dll",
            "args": [],
            "cwd": "${workspaceFolder}",
            "stopAtEntry": false,
            "console": "internalConsole"
        }, 
        {
            "name": "Launch REMOTE",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "BuildPublishCopyLinuxARM",
            "program": "/usr/bin/dotnet",
            "args": [
                "/opt/RPiDemo/RPiDemo.dll"
            ],
            "cwd": "/opt/RPiDemo",
            "stopAtEntry": false,
            "console": "internalConsole",
            "pipeTransport": {
                "pipeCwd": "${workspaceRoot}",
                "pipeProgram": "ssh",
                "pipeArgs": [
                    "-T",
                    "-p", "2222",
                    "root@192.168.81.129"
                ],
                "quoteArgs": true,
                "debuggerPath": "/usr/bin/vsdbg/vsdbg"
            },
            "logging": {
                "engineLogging": true,
                "programOutput": true,
                "exceptions": true
            }
        },
    ]
}

Expected Behavior

Debugger should launch and attach to the process on the RPi and provide debug information to VS Code.

Actual Behavior

Debugger prints the following error message: Unable to attach to CoreCLR. Unknown Error: 0x80131c4f.
I have then enabled logging via "engineLogging": true, to obtain more details (as shown in the log below).

I'd like to note, that the console project works perfectly both locally on the Win 10 x64 host and also when being launched manually on the RPi via the dotnet RPiDemo.dll command (directly in the published directory '/opt/RPiDemo').

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions