Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show Dynamic Configuration Providers with No Context (file opened) #196768

Conversation

WardenGnaw
Copy link
Member

@WardenGnaw WardenGnaw commented Oct 26, 2023

This PR adds support to show dynamic configurations when a file is not selected.

The changes introduces a new method to the Debugger class called hasDynamicConfigurationProviders. It utilizes the existing ConfigurationManager.hasDebugConfigurationProvider but passing Dynamic TiggerKind instead of Initial.

Fixes: #193828

Start Debugging before changes:
image

Start Debugging after changes:
image

Note: For the images above, only C# Extension and C# Dev Kit Extensions are installed.

This PR adds support to show dynamic configurations when a file is not
selected.

The changes introduces a new method to the Debugger class called
hasDynamicConfigurationProviders. It utilizes the existing
ConfigurationManager.hasDebugConfigurationProvider but passing Dynamic
TiggerKind instead of Initial.
@roblourens
Copy link
Member

Sorry, I think I'm confused- this isn't showing dynamic configurations, it's showing debuggers that have dynamic configuration providers, right? And it doesn't call provideDebugConfigurations and show those configs, but just will allow calling resolveDebugConfiguration for a dynamic provider. But you could already get this behavior by using an "Initial" config provider kind.

I think I was expecting that you would try to show the dynamic configs like this

image

@WardenGnaw
Copy link
Member Author

. But you could already get this behavior by using an "Initial" config provider kind.

Initial will save it to launch.json, and we are looking for the experience where it would not do that.

We could show all the dynamic configurations from provideDebugConfigratuions, but I believe those lists can get long depending on the extension. It would be safer to just show the Configuration Provider, let the user click, then show the configurations.

@roblourens
Copy link
Member

roblourens commented Nov 6, 2023

Ok, this makes sense. I'll test it a little and merge it. I've just been confused because you said "show dynamic configuration providers" when this is showing "debuggers that have a dynamic configuration provider registered" but now I am on board.

@roblourens roblourens added this to the November 2023 milestone Nov 6, 2023
@roblourens roblourens enabled auto-merge November 6, 2023 20:10
@WardenGnaw
Copy link
Member Author

Ah, sorry about that confusion. I forgot that the name was the debugger and not the provider itself.

@roblourens roblourens merged commit 20b330d into microsoft:main Nov 6, 2023
amunger pushed a commit that referenced this pull request Nov 9, 2023
…urationsNoContext

Show Dynamic Configuration Providers with No Context (file opened)
amunger pushed a commit that referenced this pull request Nov 13, 2023
…urationsNoContext

Show Dynamic Configuration Providers with No Context (file opened)
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
@WardenGnaw WardenGnaw deleted the dev/waan/showDynamicConfigurationsNoContext branch July 12, 2024 18:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend scenarios when dynamic configuration providers will be shown for Run and Debug
3 participants