Skip to content

RFC: Formatting of debug values #2140

Open
@cdaringe

Description

@cdaringe

Is your feature request related to a problem? Please describe.

#1775 implemented custom descriptions, but the motivating context issues also talk about values, which are missing support.

I'm debugging gleam-lang via javascript. It is a compiled language, and has a thin runtime and data-structure glue layers to make it work great in javascript.

My map looks something like this in the JS debugger:

Dict {
  root: {
    type: 2,
    bitmap: 1,
    array: [
      {
        type: 0,
        k: [
          0,
          0,
        ],
        v: "S",
      },
    ],
  },
  size: 1,
}

As you can see, not very friendly.

I'd like the following:

Dict {
  '[0,0]': "S"
  _raw: /* reference to the raw/unformatted data-structure implementation */
}

Describe the feature you'd like

customProperties was marked deprecated in this repo, but it kind of works for my use case. Ideally, something like [Symbol.for('debug.value')] or similar.

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions