Skip to content

Support "inspect()" method from "dart:developer" library #2137

@niklashigi

Description

@niklashigi

The dart:developer library has an inspect(Object object) method with the following description:

Send a reference to object to any attached debuggers.
Debuggers may open an inspector on the object. Returns the argument.

Dart Code currently doesn't do anything when inspect is called, so I was wondering if adding support for it has ever been considered. Here's how I would imagine this feature to work:

  • Dart Code detects that inspect was called.
  • The matching value inside of the "Variables" panel is resolved.
  • The "Variables" panel is expanded and the resolved value is highlighted.

Is this doable? If it is, I'd be happy to make a pull request. I might need a little heads up on where to start though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in debuggingRelates to the debug adapter or process of running debug sessionsis enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions