Can't debug app inside docker container. "Could not find the CoreCLR binaries directory"

I'm trying to debug very simple app in docker container running on linux remote host.

 

My app:

using System;
using System.Threading;

namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
int i = 0;
while (true)
{
Console.WriteLine("bip "+ i.ToString());
Thread.Sleep(5000);
i++;
}
}
}
}

Docker file:


FROM mcr.microsoft.com/dotnet/core/runtime:3.1
WORKDIR /test
COPY ./bin/Debug/netcoreapp3.1/* ./

ENTRYPOINT ["/usr/bin/dotnet", "/test/ConsoleApp2.dll"]

When i try to attach debugger i get:

Input/Output redirection disabled: Debugger is attached to an already running process

And in rider logs there is:


--- EXCEPTION #1/2 [ArgumentException]
Message = “Could not find the CoreCLR binaries directory”
ExceptionPath = Root.InnerException
ClassName = System.ArgumentException
HResult = E_INVALIDARG=COR_E_ARGUMENT=WIN32_ERROR_INVALID_PARAMETER=80070057
Source = JetBrains.Debugger.Worker
StackTraceString = “
at JetBrains.Debugger.Worker.DotNetCore.DotNetCoreAttachHandler+<GetAdditionalSessionParameters>d__2.MoveNext () [0x0003d] in <32c5fdf8110c411fb3681c67f4cbdc4b>:0
at JetBrains.Util.CollectionUtil.ToIReadOnlyList[T] (System.Collections.Generic.IEnumerable`1[T] enumerable) [0x00058] in <8596aa57a048429a8560d45c40a89e06>:0
at JetBrains.Debugger.Worker.SessionStartup.ModelStartInfoHandlerBase`1[TStartInfo].GetStartInfo (JetBrains.Lifetimes.Lifetime lifetime, JetBrains.Rider.Model.DebuggerWorker.DebuggerStartInfoBase modelStartInfo, JetBrains.Rider.Model.DebuggerWorker.SessionProperties properties) [0x00035] in <32c5fdf8110c411fb3681c67f4cbdc4b>:0
at JetBrains.Debugger.Worker.DebuggerWorker.OnSessionCreated (JetBrains.Lifetimes.Lifetime sessionLifetime, JetBrains.Rider.Model.DebuggerWorker.DotNetDebuggerSessionModel sessionModel) [0x00081] in <32c5fdf8110c411fb3681c67f4cbdc4b>:0

1 comment
Comment actions Permalink

Hello Maciej,

In order to investigate the issue, we will need some additional information. Please do the following:

  • Navigate to `Help | Diagnostic tools | Logs settings` and enable Trace scenario for Debugger;
  • Reproduce the issue, collect the full log bundle via `Help | Compress logs`, disable Trace scenarios;
  • Attach the resulting log bundle with a new issue for further investigation.

Thank you in advance!

0

Please sign in to leave a comment.