hediet / vscode-debug-visualizer

An extension for VS Code that visualizes data during debugging.

Home Page:https://marketplace.visualstudio.com/items?itemName=hediet.debug-visualizer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C/C++ support improvement

diggit opened this issue · comments

Hi,
your extension could really help me in embedded C/C++ development. I thing this extension deserves so much more attention!

I cann use C++ demo here, as it relies on application to provide json data in string.

From the docs and related issues #52 #101 i got the idea, that debug-visualizer needs data as json. I've also seen several mentions of extractors which I guess could help with this conversion.
Your last comment in #66 got me confused. Is it even possible to grab some data from debugger, convert them to json a give to visualizer in the first place?

Unfortunately, I am not familiar with how extensions works nor javascript/typescript.
I don't even know where to start. Where to put such extractor sources or how to even write one...

Could you please provide some minimal example and instructions?

I just wan to visualize contents of buffer as simple plot.

int main() {
	float counter = 1;

	for (auto& x : buffer) {
		x = counter;
		counter *= -1.05f;
	}
	return 0;
}

Which debugger do you use? Lldb or gdb?

You can extend lldb with custom python scripts.
These python scripts could theoretically extract JSON from your c++ buffer, please don't ask me how.

Sadly, I'm neither fluent with c++ nor lldb and am primarily a web developer, so I'm not really motivated to heavily invest into c++ support.

I am open for collaboration though!