zdenek
zdenek

Reputation: 24478

Display a result of debugger's step as an inline text

For my debugger extension I'd like to implement a functionality from the following image where a step can ask a debugger client to show an inlined text with the result of the step.

I've read the DAP documentation thoroughly but still don't have a clue how this can be implemented or if it's even possible to implement. What request or event do I have to implement?

By the way, how is this function of debbuger client called?

Result of step as an inline text

Upvotes: 1

Views: 961

Answers (1)

Mark
Mark

Reputation: 182974

With vscode v1.54, see Inline value provider

Today the Show Inline Values feature of VS Code's debugger is based on a generic implementation in VS Code core, and doesn't provide customizability through settings or extensibility via extensions. As a consequence, it is not a perfect fit for all languages and sometimes shows incorrect values because it doesn't understand the underlying source language. For this reason, we are working on an extension API that allows to replace the built-in implementation completely or to replace parts of the implementation with custom code.

In this milestone we've made a first implementation of the proposed API available.

And much more at the first link including sample code. So vscode is adding a true API for inline values rather than depending on Decorations anymore.

Upvotes: 1

Related Questions