Viewing pointers as arrays in the Watch window of VSCode

Putting a pointer in the WATCH ov VSCode window only shows you the fist value. If only there was a way to see more elements. If only there was a way to see it a an array.

Well… In order to view pointers as arrays in WATCH of VSCode, you can do the following. In watch write:


In this case, we will see 10 values of uint8_t, but you can change the array size and variable type to your liking.

Happy programming!



Or if you only have an address:

*(uint8_t(*)[4])(uint32 *)myAddress

1 Like