I am running Visual Studio 2015 and never had issues debugging before. However, lately debugging is very slow. I also started getting heap debug errors saying "Heap Corruption Detected" from the Microsoft Visual C++ Runtime Library. I will fix the errors where the application is writing to memory after the end of the heap buffer, but the debugger is extremely slow even when I am not running the code that throws those errors. I think there is some heap-checking setting on, and I want to turn it off.
The debug output window has two lines at the top, each saying Page heap: pid 0x530: page heap enabled with flags 0x2.
I believe this is the source of the problem, or at least related. I cannot turn off page heap. I tried in the gflags GUI (nothing was checked, but I tried checking and un-checking), and I tried on the command line. Restarted VS, restarted my computer, uninstalled and reinstalled VS... nothing works.
When I run the release configuration in VS, it is still slow and I still see the page heap messages at the top of the output window. However, instead of getting the heap debug error messages, the application just freezes. But the page heap messages make me think this is an issue outside of VS, not something to do with my debug configuration.
Edit: I am using wxWidgets 3.1 and I noticed my program runs slowest during wxWidgets-related events, like opening a file or outputting many lines to a textCtrl. Not sure if this is relevant or not.