Reputation: 6497
I'm using vscode to debug some c++ code, however I cannot inspect any (heap allocated) objects. Like in this example:
float arrayStack[10];
for (size_t i = 0; i < 10; i++)
{
arrayStack[i] = -42.3;
}
float *arrayHeap = new float[10];
for (size_t i = 0; i < 10; i++)
{
arrayHeap[i] = 84.6;
}
Values of "arrayStack" can be inspected during debugging whereas I can only see the first value of "arrayHeap" but not all elements. Vs-Code allows me to open a "memory.bin" file for "arrayHeap", but it's not really comparable to inspecting "arrayStack". In reality I'm trying to inspect an Eigen::Matrix after initialization and in contrast to my simple example it's really hard to see whats going on there.
I've heard about .natvis files for vscode, but I'm not sure if that is helping / best practice for my problem
Upvotes: 2
Views: 925