Hi,
Visual Micro auto detects char arrays so for fixed len arrays you could simply use this {rxPacket.data} in the breakpoint "when hit" action
Alternatives If you need to provide the length then you can call your own methods.
For example a "when hit" of {debugPacket} would expect a method called debugPacket() to be fined.
You can also use the visual micro project property "#define _DEBUG constant" to a value such as 1. This property is dependent on selected configuration so when you switch between "Release" and "Debugg/Local windows debugger" the constant will define or un-define and the code will show that state accordingly.
Alternatively use #if VM_DEBUG which visual micro defines during complication if a debug compile is being performed.
This example uses the project #define _DEBUG constant to print your array.
#if _DEBUG
char debugPacket()
{
for (int i = 0; i<rxPacketLen; i++)
{
Serial.print(rxPacketData[i]);
Serial.print(" ");
}
return ' ';
}
#endif
note: the debug method needs to return at least one char which is why the example returns a single space. You could alternatively copy the array into a zero terminated string and return that from the method. This would avoid your having to use serial print but would consume more memory.
Of course you can use the above constants and leave your normal debug code in place.
Lastly the project properties has a "Constants (configuration)" property where you can add "DEBUG" as a define. This will allow your existing debug code to work in tandem with the visual studio toolbar configuration switch "Release\Debug" etc. The visual micro debugger uses serial but your code can still print to serial as long as your own .print() commands are terminated with a line feed .println()
Hope this helps.