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

Deemphasise an initial configuration provider if an extension is installed. #184457

Closed
WardenGnaw opened this issue Jun 7, 2023 · 11 comments · Fixed by #193157
Closed

Deemphasise an initial configuration provider if an extension is installed. #184457

WardenGnaw opened this issue Jun 7, 2023 · 11 comments · Fixed by #193157
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded

Comments

@WardenGnaw
Copy link
Member

WardenGnaw commented Jun 7, 2023

I'm looking to either remove or deemphasise a debugger selection from the dropdown for initial configuration providers if an extension is installed.

For example, I'm looking to hide the .NET 5 and .NET Core debugger if C# Dev Kit is installed.
image

The other ideal is that we could somehow show a Dynamic Configuration Provider C# even though no file context is present.
E.g.
image

@roblourens
Copy link
Member

So your extension provides those configurations? So you are in control of whether they show up, right? So what do you need?

@roblourens roblourens added the info-needed Issue requires more information from poster label Jun 7, 2023
@WardenGnaw
Copy link
Member Author

I have two asks here:

  1. What is a good way to hide .NET 5+ and .NET Core from the debugger dropdown list without unregistering the debugger since we still want to provide that functionalty if they do not have the C# Dev Kit extension installed.

  2. Is it possible to show the C# Dynamic Configuration provider if no file is selected. Instead of acting on a specific language/file, it just works on the opened folder.

@roblourens
Copy link
Member

Sorry I still don't understand what you're asking me for, do you control the extension or are you trying to suppress another extension's functionality?

@WardenGnaw
Copy link
Member Author

I control the extension. My extension will check if another extension is installed and would like to remove itself from the debugger list that is presented to users, but still be able to have its resolveDebugConfigurations API be called.

@roblourens
Copy link
Member

I'm on board now, I missed the detail that this involves the static initialConfigurations. Does the C# Dev Kit totally take over the debugger functionality? What happens if I have a c# launch config already configured?

If you want to disable your debug adapter entirely, there is an option to include a when clause on your debugger contribution, and you could set that to a context key that you control, I think that would do it.

If you are trying to keep the debugger enabled in this case but just remove it from that one menu, then I might need to hear more details about the relationship between the two extensions, and we can set up a call if that's easier.

@WardenGnaw
Copy link
Member Author

Does the C# Dev Kit totally take over the debugger functionality? What happens if I have a c# launch config already configured?

We want to emphase on the C# Dev Kit experience with the dynamic configurations over using initial configurations since to simplify the experience of using Visual Studio on Windows to VS Code (for any platform) we are utilizing launchSettings.json.

So I am looking for "If you are trying to keep the debugger enabled in this case but just remove it from that one menu,"

I might need to hear more details about the relationship between the two extensions, and we can set up a call if that's easier.

Sounds good. I'll find a time on your calendar.

@roblourens roblourens added feature-request Request for new features or functionality debug Debug viewlet, configurations, breakpoints, adapter issues and removed info-needed Issue requires more information from poster labels Jun 14, 2023
@roblourens roblourens added this to the July 2023 milestone Jun 14, 2023
@roblourens
Copy link
Member

We discussed allowing the C# extension to disable just the initial configurations for its base debug adapter type via a when clause. That will lead the user down the right path when they want to set up debugging and have the dev kit extension installed.

@roblourens roblourens modified the milestones: July 2023, August 2023 Jul 26, 2023
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Sep 18, 2023
@bhavyaus bhavyaus added the verification-needed Verification of issue is requested label Sep 26, 2023
@meganrogge meganrogge added verification-steps-needed Steps to verify are needed for verification ~verification-steps-needed Steps to verify are needed (with bot comment) and removed verification-steps-needed Steps to verify are needed for verification labels Sep 26, 2023
@vscodenpa
Copy link

Friendly ping! Looks like this issue requires some further steps to be verified. Please provide us with the steps necessary to verify this issue.

@vscodenpa vscodenpa added verification-steps-needed Steps to verify are needed for verification and removed ~verification-steps-needed Steps to verify are needed (with bot comment) labels Sep 26, 2023
@roblourens
Copy link
Member

Have you implemented this in C# @WardenGnaw?

If not, verification steps for us

  • Add or modify a debugger contribution to include a hiddenWhen context key
  • When that key is true, the debugger should be hidden from the debuggers list that you get eg when you don't have a launch.json and you click the button to create one or start debugging

@WardenGnaw
Copy link
Member Author

Yep! This was added in dotnet/vscode-csharp#6405

@roblourens roblourens added verified Verification succeeded and removed verification-steps-needed Steps to verify are needed for verification labels Sep 27, 2023
@roblourens
Copy link
Member

Alright, assuming that it's working for you as expected, I'll mark this as verified

@github-actions github-actions bot locked and limited conversation to collaborators Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants