Any chance to inspect VLAs in CLion debug?
Answered
It seems to me that variable-length arrays cannot be inspected in variable view at debugging time. Any idea?
Please sign in to leave a comment.
Hello!
What debugger do you use, LLDB or GDB? Also please provide a simple code sample and a screenshot of results in the Variables tab. Thanks!
Hi, Anna!
I use Bundled LLDB version 6.0.1, Xcode 10.1, CLion 2018.3.4 on macOS 10.14.3.
A sample code is as follows:
This is the screenshot just after I pushed the right side drop down icon of the arr variable.

Thanks!
Tatsuhiko, thank you for the response! Feel free to comment or upvote a related issue in our tracker in order to get updates: https://youtrack.jetbrains.com/issue/CPP-6491.
The only workaround I can come up with is to add an expression similar to ((int (*)[5])arr) to Watches: