Skip to content

Debug: Support launch config grouping and sorting #82332

Closed

Description

It would be cool to support grouping in the debug launch configs, such that we can minimize the noise in the picker:

image

One idea is to mimic the menu API: https://code.visualstudio.com/api/references/contribution-points#Sorting-inside-groups

We could support a group option which would allow to join launch configs together as well as sort them.

We can even have special groups like commandPalette which means that the launch config should only appear in the command palette.
Some other special groups could be hidden - so the launch can only be referenced by compounds, but not launched by the user.

Activity

  1. isidorn commented on Oct 11, 2019

    @isidorn

    This makes sense. Assigning to October to look into it this milestone.
    The group option would be in the launch configuration. We should maybe filter it out before sending it out to the debug adapter. Whoever we already have some "UX" attributes in the configuration so this shuold not be new teritory.

    Related - duplicate #64624

    fyi Andre Weinand (@weinand) roblourens

  2. added
    debug
    feature-request
    on Oct 11, 2019
  3. isidorn commented on Oct 16, 2019

    @isidorn

    Ok, so let's recap what we want to tackle here:

    1. Ability to hide launch configurations from the dropdown and from the command palette (after typing debug )
    2. Ability to group launch configurations / compounds (groups separated by a visible separator)
    3. Ability to sort launch configurations

    Here are some proposals how to do that:

    1. We add a attribute presentation in the launch configuration which is a structured object. presentation has the following fields (we can add more later):
    • visibility: can be hidden, visible, commandPalette
    • group: open ended string (name of the group which is not visible in the UX, just used for separation and sorting)
    • order: number used for sorting inside a group3

    Note that group and order could potentially be merged into one. Example: 1_groupName@5. Here the group is 1_groupName and 5 is the order. We use this for our commands.
    The name presentation is taken from tasks reference, however tasks use group for something else (for what we use compounds for).

    Example

    {
    			"name": "Server",
    			"type": "node",
    			"request": "launch",
    			"program": "${workspaceFolder}/src/debugAdapter.ts",
    		        "presentation": {
                                 "visibility": "hidden",
                                 "group": "1_firstGroup",
                                 "order": 3
                             }
    }

    fyi cstavaru grbd Alex Ross (@alexr00) Andre Weinand (@weinand) roblourens João Moreno (@joaomoreno)

    Looking forward to the feedback

  4. alexr00 commented on Oct 16, 2019

    @alexr00
    Member

    In package.json for ordering of menu items we just have group, no order. Order is instead expressed by @ and then a number:

    {
    	"command": "command1",
    	"group": "1_firstGroup@1"
    },
    {
    	"command": "command2",
    	"group": "1_firstGroup@2"
    }
    

    For consistency we could keep that pattern.

  5. cstavaru commented on Oct 16, 2019

    @cstavaru

    Proposal looks good to me, Alex Ross (@alexr00) may also have a valid point.

  6. isidorn commented on Oct 25, 2019

    @isidorn

    João Moreno (@joaomoreno) deep appologies since I did not find time for this before going to Spain (requires some refactoring and is not that low hanging). I'll try to put it on a plan for next milestone.

  7. joaomoreno commented on Oct 25, 2019

    @joaomoreno
    ContributorAuthor

    ay caramba

  8. smorel commented on Nov 13, 2019

    @smorel

    Can't wait to see that coming that would be really great!

  9. isidorn commented on Dec 20, 2019

    @isidorn

    As suggested in my comment above it is now possible to specify the presentation of a debug configuration or a compound.

    For an example usage here is me adopting it for our launch.json in this repo ecc140e

    We render seperators between groups, both in the dropdown and in the quick open.
    The command palette also respectes these presentation options.

    Before:
    Screenshot 2019-12-20 at 11 11 43

    After:
    Screenshot 2019-12-20 at 14 53 19

    Screenshot 2019-12-20 at 14 54 30

  10. weinand commented on Dec 20, 2019

    @weinand
    Contributor

    Isidor Nikolic (@isidorn) please explain "redenregin" above.

  11. isidorn commented on Dec 20, 2019

    @isidorn

    Andre Weinand (@weinand) sorry! Rendering was the word.

  12. isidorn commented on Dec 20, 2019

    @isidorn

    We are now rendering separtors, I have updated the top picture.

    Edit: created a test plan item for this

  13. added
    verification-needed
    on Dec 20, 2019
  14. added and removed
    verification-needed
    on Jan 21, 2020
  15. added
    on-release-notes
    on Jan 31, 2020
  16. locked and limited conversation to collaborators on Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debugfeature-requeston-release-noteson-testplan

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions