PlatformIO Community

How to dump on file global array during debugging?

Hi all,
I am new to platformIO, so it may be dumb question. I also wonder if this is more related to vscode instead.

My question is: how do I dump an array when debugging?

I would like to dump aADCyConvertedValues to plot the data, but I can only copy one-by-one.

Any way to do this efficiently?

The bottom “Debug Console” tab gives you a GDB console. Halt the processor (pause button or breakpoint) and use regular GDB commands like

print aADCyConvertedValues

to print your variables. You may also directly use dump.

I used:

dump value data.bin aADCyConvertedValues