Skip to content

Improve debugging experience of Microsoft.Extensions.DependencyInjection #86553

Closed
@JamesNK

Description

@JamesNK

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:

  • Its service descriptors (the information that ServiceCollection displays)
  • Is it a scoped or root service provider
  • Is it disposed
  • Realized services
  • Registered disposable services
  • More that I haven't thought of?

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions