Back to results for “Performance”
.NET › Diagnostics & Performance

What is the Diagnostics IPC channel, and how do diagnostic tools like dotnet-trace connect to a running .NET process without a debugger?

Beginner

Answer

Every .NET process exposes a diagnostics IPC (inter-process communication) channel automatically at startup (a named pipe on Windows, a Unix domain socket on Linux/macOS), which diagnostic tools like dotnet-trace, dotnet-counters, and dotnet-dump connect to in order to send commands and receive data -- this out-of-process design means diagnostics can be performed on a live production process without attaching an invasive debugger or restarting the application.
# List processes with an active diagnostics IPC channel
dotnet-trace ps

# Connect to a specific process and start collecting
dotnet-trace collect --process-id 1234
Real-world example An operations team runs dotnet-trace ps to discover all currently running .NET processes across a shared server, then attaches diagnostics to a specific one experiencing issues, all without any prior instrumentation or restart.

Common follow-ups: How is the diagnostics IPC channel secured against unauthorized access?;What happens if a process was started before diagnostics tools existed on the machine?