Debug dotnet core with LLDB on RHEL Image

This post is based on a quick note on how to create a docker image for openshift/k8s to debug dotnet core app with LLD online in the containter environment.




It will request a Red Hat developer account to register to RHN when trying to enable rhel-7-server-devtools-rpms RPM repo on Red Hat. However, if it is a docker environment, which is not required to register the docker instance to RHN to add this repo. So the repo could be enabled in Dockerfile. Then the LLDB toolset would be installed to this image.

# From a customized RHEL dotnet sdk base image
FROM dotnet/dotnet-21-rhel7

# Set the timezone

USER root
RUN yum-config-manager --enable rhel-7-server-devtools-rpms
RUN yum install -y wget tcpdump vim llvm-toolset-7
RUN rm -rf /opt/app-root/.pki

USER 1001

How to debug dotnet core app with LLDB

(TODO): Push the image to dockerhub and launch more test with AWS environment.

Complete this post with more details on how to apply LLDB on memory check and online debug.