Debugger Visualizers

Problem

When debugging, it is difficult to see the contents of complex structs because Builder does not have a way to interact with the debugger. It would be nice if Builder could provide an IdeHoverProvider which contains information about what is underneath the cursor while in a Debugger session.

This should be implemented in a way that allows for custom renderers of content. For example, hovering over a GdkPixbuf should display the contents of the pixbuf as an image if possible.

Goals

  1. To provide insight during a debugging session to the contents of complex variables and structs which may not be show in the locals directly.

Anti-Goals

Affected Modules

  1. libide-debugger
    1. Add visualizer APIs for plugins to implement
    2. Add hooks to locate what is under cursor
    3. Add vfuncs to describe variables/locals/etc
  2. Debugger plugin (src/plugins/debuggerui)
    1. Debugger agnostic hover provider to bridge gdb<->hover implementation

  3. Gdb (src/plugins/debugger)
    1. Implement visualizer APIs
    2. Add hooks to describe address/variable/function/etc

Interfaces

  1. IdeDebuggerVisualizer — A plugin interface to provide a visualizer for certain kinds of content (such as image data, structs, etc)

  2. IdeDebugger — Extend the interface to get variable information (and possibly keep it up to date on stop changes)

Risks

  1. Rendering content from within an application can be inherently risky, so we should ensure that we don't do too much content decoding. However, if we have access to raw image buffers, that is relatively safe to render (albeit possibly scaling).

Implementation Details

Apps/Builder/ThreePointThirtyfive/DebuggerVisualizers (last edited 2019-09-19 01:39:16 by ChristianHergert)