Skip to content

debugger protocols requests #127

@bmeck

Description

@bmeck
  • get frame from function reference: this would allow inspecting closures without necessarily needing the stack to have the closure in question on it
function f() {
  let saved = 0;
  function g() {
    return saved;
  }
  return g;
}

// no way for debugger to ever get back to see "saved"
// unless we force g() to evaluate somehow

This might also be handy if we can use it to get the location to set a breakpoint if a <frame> can be returned. The ability to use <select> on the result would be necessary for inspection, and I'm unclear if it is safe to do that currently with some things like generators.

This would be greatly useful.

  • way to crawl the "heap": right now there isn't a way to get to non-trivial persistent values like those held by Timer.set

If you are doing memory debugging this can help a bit to see what GC roots are growing. This is probably fairly low priority since other low hanging fruit would probably be almost if not as useful.

  • shallow inspection

instead of using toggling and iterating an entire tree, being able to crawl manually would be nice.

<property flags="-cEw_" name="go" value="@00007FBEE5067CE0">

might be possible to query using something like:

<props id="00007FBEE5067CE0"/>

Currently it is possible to emulate this but there is a lot of unused data being sent around. Additionally inspecting things not on the stack also seems to be impossible currently (idk if it is even safe to do so?).

Since this is a usability feature, it is also likely to be low priority.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions