In Clion's debugger, how do I show the entire contents of an int array

Embedded_Mugs picture Embedded_Mugs · Oct 30, 2016 · Viewed 19.9k times · Source

Right now it is only showing the first element of the array but I want a visual of all the elements in the array. I think Clion is using GDB.

EDIT: I am referring specifically to arrays on the heap. Arrays on the stack can be visualised.

Answer

Miguel Alonso Jr picture Miguel Alonso Jr · Jan 31, 2017

The answer by cubuspl42 works for GDB. But if you're on a Mac using LLDB as your debugger, the correct method is

(MyType(*)[128])myArray

Hope this helps!