microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
160.73k stars 28.16k forks source link

Improve organization options for launch configurations #213169

Open firelizzard18 opened 1 month ago

firelizzard18 commented 1 month ago

I want VSCode to add more powerful presentation options for launch configurations. Currently the only tool I have for managing a large body of launch configurations is grouping. However grouping falls short when I have 40 launch configurations. I think there are fundamentally two issues: how configurations are organized, and how I select a configuration. As far as organization, the best practical solution I can think of is nesting, i.e. nested groups, even if it's just one level - just subgroups.

As far as selecting a configuration, the current setup - a flat dropdown menu - is really limiting. Grouping helps very little when all it does is add separators. All of the launch configurations are still in a flat list so that only marginally helps with the "I have too many configurations" problem. Simply converting the dropdown into a menu with submenus for groups would help, though that increases the number of clicks I have to make. Personally I think a tree view would work better, especially with nested groups, though I'm not sure how to make that UX work. Maybe something like the test explorer? And maybe the launch configuration pane automatically hides itself when you start debugging?

My truly ideal solution would include parameterization of launch configurations. One of the more annoying aspects of the current setup is opening launch.json to tweak parameters. I already have 40 launch configurations, so adding more for various permutations is untenable. I'd love to be able to specify variables in the configuration and have a UI that presented those as input boxes or something. Even better if it remembers previous permutations I ran without me having to record them. Better yet if I could record certain presets as a kind of sub-configuration. But of course that's a lot more engineering and a much harder UX design.

gjsjohnmurray commented 1 month ago

Re parameterization are you aware of Input Variables?

firelizzard18 commented 1 month ago

@gjsjohnmurray I was not, thank you. That may be very helpful, I'll have to play with it.

roblourens commented 1 month ago

Thanks for the feedback. I think input variables should help for the last part. Are most of your 40 configurations just different inputs to launch the same thing, or does your workspace have lots of different independent things to be launched?

I'm not sure about trying to do a tree view or more sophisticated grouping, as you say, the UX is tough and I don't want to take up more space when this probably doesn't come up that often. Maybe an extension could add a custom tree view for this. Also, you might be interested in the debug quick access, to easily find a launch config by typing. Run the command "Select and Start Debugging"

firelizzard18 commented 1 month ago

Are most of your 40 configurations just different inputs to launch the same thing, or does your workspace have lots of different independent things to be launched?

Lots of independent things. It's a complex application that embeds multiple services and can be run in multiple ways and has various tools for managing, backing up, compressing, cleaning up, and otherwise maintaining the database, maintenance routines for interacting with the live application, a simulator, code generators, etc. TL;DR, it's a monorepo with lots of bits.

Maybe an extension could add a custom tree view for this.

I could try creating something with an extension, but beyond representing the existing groups as a tree, I'm not sure whether creating more organization that that would be feasible. Of course I could hack something together like using config.presentation.group.split('/') to organize subgroups, but I'd rather something less hacky. If I add custom values within "presentation", will those be discarded when vscode parses launch.json? Actually now that I think about it, I have no idea if there's any way for an extension to access launch.json short of reading it from disk.

Also, you might be interested in the debug quick access, to easily find a launch config by typing.

:+1: I bound that to F4, I'll see if that helps.

roblourens commented 1 month ago

If I add custom values within "presentation", will those be discarded when vscode parses launch.json? Actually now that I think about it, I have no idea if there's any way for an extension to access launch.json short of reading it from disk.

launch configs aren't exposed in extension API, and you can also have launch configs in workspace config files or user settings, which makes it a bit tricky to extend as an extension. But you could definitely read the file manually and build something useful, even if it's just for personal use.

I'm not sure I'd want to add more organization options in vscode though, just since I don't think this has been a common issue.

VSCodeTriageBot commented 1 month ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!