option to export Watch array values as text
There are times when (large) arrays of values need to be exported for comparison / graphing.
There are two existing mechanism within CrossWorks, but neither is ideal:
One is to add debug_print code to the target application at various points in the code and then manually copy and paste the output in the terminal window.
This has the disadvantage of forcing the code to compile in extra libraries (including support for floating point printing if applicable). It is very slow (particular for floating point where the target CPU is formatting each value). Finally, it requires that all expected examination points must be compiled into the program.
Two is to use the Debug -> Other Windows -> Debug Immediate window.
This is as fast as Watch (and much faster than the above), but requires that the value format be preset via a global setting in Tools -> Options -> Debugging -> Default Display Mode.
More importantly, Debug Immediate seems to cap display of arrays to very small ranges (31 elements in my testing).
Watch and Quick Watch already have a right-click menu for various options. My hope would be that an export to text (file or clipboard) could be added there.
To keep things more simple, for multi-dimensional arrays and/or arrays of structs, my suggestion might be to export struct elements in columns and each array element (regardless of number of array dimensions) as a distinct row.
Please sign in to leave a comment.
Comments
0 comments