Can't debug .NET Core in a docker container on Linux

After rebooting, I get an error while trying to debug any docker containers.
Started a process for debugging, but no CoreCLR runtime was seen to be loaded within the 00:00:16 time limit.

I can run it without the debugger and the code runs fine but in with debugger the container dies.

My only solutions have been returning to prior backups of the VM I work in or rebuilding the entire system. Reinstalling Rider, dotnet core, docker and mono did not solve the issue.

Logs also show "Environment variable 'DEBUGGER_PARENT_PROCESS_PID' is not defined => do not watch parent process to die"

0
11 comments

Hello Connor,

I am very sorry to hear that you have faced with such difficulties. Could you please collect the logs with enabled trace scenario for Debug:

  1. Enable Debug trace scenario (Help -> Trace Scenarios)
  2. Start debugging session and reproduce the issue
  3. Collect logs via Help -> Compress log...
  4. Don't forget to disable the trace scenario. Otherwise, Rider will write lots of information in the log.

Please attach the resulting log bundle here. Please also let me know the .net core version. Thank you in advance!

0

Hi Olga, thanks for the quick response, hopefully we can get me back to it without having to go back to VS!

Is there an email I can send the logs to instead? I rather not post logs here with the potential of sensitive data

0

Hello Connor,

I hope the same. You can upload the logs with submitting a Support request (Help | Contact Support) or you can create an issue on YT: https://youtrack.jetbrains.com/newIssue and add logs to it. 

0

What's your SLA Olga? I submitted a ticket yesterday at 3:30 with no response. Losing my mind here without a debugger. 

0

Just for anyone else that may be watching this issue, JetBrains told me it's an issue with Ubuntu. I'm still waiting to hear what distributions the debugger for docker works on so I can workaround it for now. They started up an issue here too. https://youtrack.jetbrains.com/issue/RIDER-33004

0
Avatar
Permanently deleted user

Hello, all. 

Facing the same issue with Alpine based images. Any updates on this issue?

0

As it was stated in the original issue RIDER-33004, we were not able to reproduce the issue for investigating the possible reason for it. Please make sure you are running the latest available Rider release which is 2019.3.1 now and open a new issue on our bug tracker with attaching the diagnostics information. Thank you in advance!

0
Avatar
Permanently deleted user

Hello, all.

I have the same problem in the current version RIDER 2020.3.2. Image is

image: postgres:13.1

And exception for DEBUG run is:

--- EXCEPTION #1/1 [LoggerException]
Message = “Environment variable 'JET_DEBUGGER_PARENT_PROCESS_PID' is not defined => do not watch parent process to die”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.Util.LoggerBase.Log(LoggingLevel level, String message, Exception ex)
at JetBrains.Diagnostics.Log.SwitchingLog.JetBrains.Diagnostics.ILog.Log(LoggingLevel level, String message, Exception exception)
at JetBrains.Diagnostics.LogEx.Error(ILog this, String message)
at JetBrains.Util.Misc.ProcessWatchdog.StartWatchdogForPidEnvironmentVariable(String envVarName, Lifetime lifetime)
at JetBrains.Debugger.Worker.DebuggerWorkerMain.<>c.<Main>b__3_0()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
 
Standard run is OK.
Thanks for your time.
0

Hejduk Jiri, please attach the full log bundle along with dockerfile with a new issue on our tracker, so we could take a closer look. Thank you in advance!

0

Hi,

I am facing the same issue in the current version RIDER 2020.3.3.

I start up the containers from a docker-compose.yml file and the container of interest is started with a dockerfile that contains a "builder" image specification and the actual target image. The source of the builder image is

FROM mcr.microsoft.com/dotnet/sdk:3.1 as builder

and the source of the target image ist

FROM mcr.microsoft.com/dotnet/aspnet:3.1

Both files, the docker-compose.yml and the Dockerfile are not located within the project folder but two levels above in the root folder of the repo. 

When I start debuggin with the "Docker-compose" Run/Debug Configuration all images will be build and all containers will be started. Unfortuantely the container that contains runs the process I want to debug, dies immediately because of the exception mentioned above.

Here is my log output:

07:04:12.508 |E| ProcessWatchdog               | Debugger worker MTA main thread:5 | Environment variable 'JET_DEBUGGER_PARENT_PROCESS_PID' is not defined => do not watch parent process to die

--- EXCEPTION #1/1 [LoggerException]
Message = “Environment variable 'JET_DEBUGGER_PARENT_PROCESS_PID' is not defined => do not watch parent process to die”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
  at JetBrains.Util.LoggerBase.Log(LoggingLevel level, String message, Exception ex)
     at JetBrains.Diagnostics.Log.SwitchingLog.JetBrains.Diagnostics.ILog.Log(LoggingLevel level, String message, Exception exception)
     at JetBrains.Diagnostics.LogEx.Error(ILog this, String message)
     at JetBrains.Util.Misc.ProcessWatchdog.StartWatchdogForPidEnvironmentVariable(String envVarName, Lifetime lifetime)
     at JetBrains.Debugger.Worker.DebuggerWorkerMain.<>c.<Main>b__3_0()
     at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
     at System.Threading.ThreadHelper.ThreadStart()

07:04:13.133 |I| DummyEncManager               | Debugger worker MTA main thread:5 | Created DummyEncManager
07:04:33.187 |E| DebuggerWorker                | Debugger worker MTA main thread:5 | Waiting for frontend was timed out within 00:00:20

--- EXCEPTION #1/2 [TimeoutException]
Message = “Waiting for frontend was timed out within 00:00:20
ExceptionPath = Root.InnerException
ClassName = System.TimeoutException
HResult = COR_E_TIMEOUT=80131505
Source = JetBrains.Debugger.Worker
StackTraceString = “
  at JetBrains.Debugger.Worker.DebuggerWorker.Init(IQueuedTasks queuedTasks)
     at JetBrains.Debugger.Worker.DebuggerWorkerMain.<>c.<Main>b__3_0()

--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “Waiting for frontend was timed out within 00:00:20
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
  at JetBrains.Util.ILoggerEx.LogException(ILogger this, LoggingLevel level, Exception exception, ExceptionOrigin exceptionOrigin, String comment)
     at JetBrains.Util.ILoggerEx.Error(ILogger this, Exception exception, ExceptionOrigin origin, String comment)
     at JetBrains.Debugger.Worker.DebuggerWorkerMain.<>c.<Main>b__3_0()
     at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
     at System.Threading.ThreadHelper.ThreadStart()

07:04:33.195 |E| DebuggerWorker                | Debugger worker MTA main thread:5 | Unhandled exception Waiting for frontend was timed out within 00:00:20

--- EXCEPTION #1/2 [TimeoutException]
Message = “Waiting for frontend was timed out within 00:00:20
ExceptionPath = Root.InnerException
ClassName = System.TimeoutException
HResult = COR_E_TIMEOUT=80131505
Source = JetBrains.Debugger.Worker
StackTraceString = “
  at JetBrains.Debugger.Worker.DebuggerWorker.Init(IQueuedTasks queuedTasks)
     at JetBrains.Debugger.Worker.DebuggerWorkerMain.<>c.<Main>b__3_0()
     at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
  --- End of stack trace from previous location where exception was thrown ---
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
     at System.Threading.ThreadHelper.ThreadStart()

--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “Unhandled exception Waiting for frontend was timed out within 00:00:20
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
  at JetBrains.Util.ILoggerEx.LogException(ILogger this, LoggingLevel level, Exception exception, ExceptionOrigin exceptionOrigin, String comment)
     at JetBrains.Util.ILoggerEx.Error(ILogger this, Exception ex, String message)
     at JetBrains.Debugger.Worker.DebuggerWorkerMain.<>c__DisplayClass4_0.<CurrentDomainOnUnhandledException>b__0(Object sender, UnhandledExceptionEventArgs eventArgs)
     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
     at System.Threading.ThreadHelper.ThreadStart()





 

 

0

Hello Christian, unfortunately the information provided is not not enough to tell the reason for the issue, please upload the complete log bundle, dockerfile, docker-compose files with a new issue on our tracker. You can set up visibility to only JB representatives there. Thanks in advance!

0

Please sign in to leave a comment.