Improve debugging experience of Microsoft.Extensions.DependencyInjection (original) (raw)

Microsoft.Extensions.DependencyInjection debug experience could be improved.

I think there are two primary APIs to focus on: ServiceCollection and IServiceProvider implementations.

ServiceCollection is already pretty good. It could be improved with a debugger display that shows the count and whether it's read-only.

image

IServiceProvider is difficult to debug. Useful information to make available:

image