Skip to content

Add 'hasDataBreakpoint' attribute at VariablePresentationHint #173

Closed

Description

@isadorasophia

Currently, we can detect whether an object has a data breakpoint by checking for the "dataBreakpoint" kind from VariablePresentationHint.

However, the variable kind is generally used to identify the actual type of the object -- that is, if it's an interface, a method or a derived class. Data breakpoint tracking, which is generally used for UI purposes, should be declared as an attribute instead, since that can be set alongside other attributes and variable kinds.

interface VariablePresentationHint {
  /**
   * ...
   * 'dataBreakpoint': Deprecated: Indicates that a data breakpoint is
   * registered for the object. The 'hasDataBreakpoint' attribute should
   * generally be used instead.
   */
  kind?: 'property' | 'method' | 'class' | 'data' | 'event' | 'baseClass'
      | 'innerClass' | 'interface' | 'mostDerivedClass' | 'virtual'
      | 'dataBreakpoint' | string;

  /**
   * ...
   * 'hasDataBreakpoint': Indicates that the object has its value tracked by a
   * data breakpoint.
   */
  attributes?: ('static' | 'constant' | 'readOnly' | 'rawString' | 'hasObjectId'
      | 'canHaveObjectId' | 'hasSideEffects' | 'hasDataBreakpoint' | string)[];

  // ...
}

CC: Gregg Miskelly (@gregg-miskelly), Andrew Crawley (@andrewcrawley), Andre Weinand (@weinand)

Activity

  1. added
    feature-request
    on Jan 26, 2021
  2. weinand commented on Jan 26, 2021

    @weinand
    Contributor

    This attribute "move" makes sense.
    But please note that for backward compatibility we will not be able to remove the attribute from the "kind".

  3. isadorasophia commented on Jan 26, 2021

    @isadorasophia
    Author

    Sure! That's why I suggested updating the documentation so we can point to "hasDataBreakpoint" instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-request

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions