Skip to content
Debugging techniques for .NET Core on Linux/Kubernetes
Branch: master
Clone or download
Joe Elliott
Latest commit d4ba422 Jun 23, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
coredumps Added alpine specific instructions Jun 24, 2019
cpu-profiling Fixed dockerhub links May 27, 2019
dynamic-tracing Fixed links May 31, 2019
images Moved to sdk image and pull dotnet dump Jun 23, 2019
perfcollect Fixed dockerhub links May 27, 2019
static-tracepoints Fixed dockerhub links May 27, 2019
todo Fixed typos Jun 9, 2019
dynamic-tracing-bcc.gif Updated main readme. Added demo May 31, 2019 Added coredumps Jun 9, 2019


This is my personal collection of notes, scripts and techniques developed to help debug live .NET Core applications. All of these techniques were performed from a sidecar in Kubernetes. If you are interested in profiling .NET Core applications running on Linux without Kubernetes then these guides still will contain a lot of useful information.

Feel free to ask questions, suggest changes or submit pull requests.


The below dynamic tracing demo was performed on this application built with this Dockerfile. Even though this application was built normally and contains no special instrumentation we can still dynamically trace any method in the application using bcc. In the following demo we will trace calculateFibonacciValue and calculateEchoValue.

bcc demo

Check out the below guides to get details on how to do this and more.

Debugging techniques

  • cpu profiling
    • Building FlameGraphs from perf data
  • static tracepoints
    • Recording and viewing LTTng events
  • perfcollect
    • Static Tracepoints and CPU Profiling the Microsoft way
  • dynamic tracing
    • Perf events and BCC to trace any method in an application without instrumentation
  • core dumps
    • Multiple methods for collecting and analyzing coredumps.

Other information

  • images
    • A collection of Dockerfiles to build sidecar profiling containers.
  • kernel interactions
    • The containers, tools, and the kernel can sometimes have weird interactions. This document contains information on how to get these tools working on a variety of kernel versions.
  • todo
    • Future work for this repo.

Previously this repo was focused on executing these techniques from the node the application was running on. If you are interested in that approach you can check it out here.

You can’t perform that action at this time.