microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.54k stars 1.56k forks source link

Feature Request: Graphing Debug Variables #8770

Open hacantorcooke opened 2 years ago

hacantorcooke commented 2 years ago

Type: Feature Request

Something that would be super awesome for this extension would be to be able to plot debugging variables on a graph. I am not a UI guy, but I would think that with all the CSS and JS, this might be not as hard as it is to implement in other IDEs? I think an example is the best way to explain this.

  1. Mark a variable(s) in the debug view window as graphed.
  2. Internally, the extension knows to either use GDB trace or to add a breakpoint on modification.
  3. The extension takes these values as the program runs and plots them as series on a graph.

Another option would be to allow the X axis to either be "time" or "sample". In cases of debugging tests, sample would be most useful. If you were debugging something real-time, time would probably be most useful.

The result would be something like this: https://visualgdb.com/documentation/livevars/

Eventually, expanding graphing capabilities would be a truly powerful tool for understanding a program's execution at a glance and IMO would greatly speed up debugging capabilities, giving VSCode and this plugin a real edge over other IDEs.

Thanks for reading and thanks for all the work on the extension!

sean-mcmanus commented 2 years ago

Similar to https://github.com/microsoft/vscode-cpptools/issues/6152 ( https://code.visualstudio.com/docs/datascience/jupyter-notebooks ), although in that case the code itself has control over the graphing versus the debugger. Seems like the front end implementation would be similar though.

mrx23dot commented 4 months ago

This should definitely be in another addon, could you try https://marketplace.visualstudio.com/items?itemName=darudesandstorm.debug-plotter