microsoft / microsoft/debug-adapter-protocol
Proposal: Support object favorites
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.8k
- Forks
- 173
- Avg merge
- 7d 7h
- Merged PRs (30d)
- 2
Description
Object Favorites
Support user customization of variable presentation by allowing users to choose their "favorite" variables. Debug adapters can then return these variables as the top-most items in variables requests, as well as customize the displayed value of variables with "favorite" children.
VS Feature: https://devblogs.microsoft.com/visualstudio/pinnable-properties-debug-display-managed-objects-your-way/
interface Capabilities {
// ...
/** The debug adapter supports adding and removing favorites on variables. */
supportsObjectFavorites?: boolean;
}
interface VariablePresentationHint {
// ...
/**
* Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values.
* Values:
* ...
* 'canFavorite': Indicates the item can be added as a favorite of its parent type.
* 'isFavorite': Indicates the item has been added as a favorite of its parent type.
* 'hasFavorites': Indicates the item's current children contains at least one favorite item.
* ...
*/
attributes?: string[];
// ...
}
/**
* Adds a variable to its parent variable's collection of favorites.
* Clients should only call this request if the capability 'supportsObjectFavorites' is true.
*/
interface AddFavoriteRequest extends Request {
// command: 'addFavorite'
arguments: AddFavoriteArguments;
}
/** Arguments for 'addFavorite' request */
interface AddFavoriteArguments{
/**
* The reference of the variable container for the variable to be added to its parent's favorites.
*/
variablesReference: number;
/**
* The name of the variable in the container to be added to its parent's favorites.
* Valid variables have a VariablePresentationHint attribute of 'canFavorite'.
* Valid variables do not have a VariablePresentationHint attribute of 'isFavorite'.
*/
name: string;
}
/** Response for 'addFavorite' request */
interface AddFavoriteResponse extends Response {
}
/**
* Removes a variable from its parent variable's collection of favorites.
* Clients should only call this request if the capability 'supportsObjectFavorites' is true.
*/
interface RemoveFavoriteRequest extends Request {
// command: 'removeFavorite'
arguments: RemoveFavoriteArguments;
}
/** Arguments for 'removeFavorite' request */
interface RemoveFavoriteArguments {
/**
* The reference of the variable container for the variable to be removed from its parent's favorites.
*/
variablesReference: number;
/**
* The name of the variable in the container to be removed from its parent's favorites.
* Valid variables have a VariablePresentationHint attribute of 'canFavorite'.
* Valid variables have a VariablePresentationHint attribute of 'isFavorite'.
*/
name: string;
}
/** Response for 'removeFavorite' request */
interface RemoveFavoriteResponse extends Response {
}
CC: @andrewcrawley, @weinand
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the proposed Capabilities, VariablePresentationHint, AddFavoriteRequest, and RemoveFavoriteRequest definitions in the issue. Review how these definitions fit the debug adapter protocol, then verify that favorite capability signaling, presentation attributes, and add/remove requests are specified consistently. Done means the object-favorites proposal is fully defined for clients and debug adapters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100