0

I have a number of massive files being loaded into various structures and used for analysis in a c++ console application in Windows. In release mode this data is managed fine, but when I enable debug it takes minutes to load and consumes many GB of memory, which effectively cripples any usefulness of the debug version. I want to be able to debug my normal code, but allow these data sets to be loaded in the normal "release" mode as access to these do not need to be debugged. I would ideally like to be able to define this at named variable level, as I still want full debug functionality of the new variables in my code.

This post: lldb-debugging-ignore-variables-of-specific-classes-to-speed-up-debugging suggested hiding the locals tab might work (but it didn't)

Is there any way of achieving this?

David
  • 151
  • 1
  • 11
  • Hi David, is there any update? – Tianyu Sep 13 '21 at 01:35
  • I was waiting to see if someone else would comment. I've no update - all the code is mine, and enable my code was already ticked (this must be a default setting). I'm still considering options for separating code into separate modules to trial your final suggestion - effectively I'm assuming I should be able to load the release version of some modules and the debug version of others, but I would need to change quite a bit of the organisational structure of the older code to do so, so I'm thinking I'll just use this strategy for future modules.] – David Oct 04 '21 at 12:28

1 Answers1

0

Try to enable “Enable Just My Code” in Tools > Options > Debugging > General > Enable Just My Code, or in C++ project’s property page > Configuration Properties > C/C++ > General > Support Just My Code Debugging > Modify it to Yes.(More details here)

Debug will load symbol files and modules for your project to debug, different from Release, so if you have a lot of files/projects… using many GB of memory will be possible.

Besides, please also check if Tools > Options > Debugging > Symbols > Load all modules, unless excluded/Load only specified modules work.(Configure symbol locations and loading options)

Tianyu
  • 895
  • 3
  • 7