Michael Walz Michael Walz - 1 month ago 6
C++ Question

Cannot step into CRT code when using runtime library as a dll

I'm using Visual Studio 2015 Update 3 and I have a very simple pure Win32 console C++ "Hello World" like this, that serves no purpose other than doing experimentation:

int main()
{
printf("Hello world");
char *test = (char*)malloc(100);
}


I cannot step into
malloc
if the project uses the Multi-threaded DLL runtime library (Project Properties->Configuration Properties->C/C++/->Runtime Library : Multi-threaded Debug DLL (/MDd)).

But when I change this setting to Multi-threaded Debug (/MTd), then steping into
malloc
works fine.

But stepping info
printf
always works fine. Stepping into my own code always works fine too.

Is there a way to enable stepping into the runtime library DLL ?

Answer

There was an error when the symbols for ucrtbased.dll build 10.0.10240.0 were published to the symbol server; the unstripped symbols (with source information) were originally published to the symbol server, but then were overwritten later when the stripped symbols were published.

We have resolved this issue and re-published the unstripped symbols. If you attempt to download symbols for this DLL from the symbol server now, you should get the unstripped symbols.

If you have already downloaded the stripped symbols, you will need to delete them from your symbol cache in order for the debugger to consider re-downloading the unstripped symbols. In Visual Studio, go to Tools => Options, Debugging => Symbols. There is a text box there, "Cache symbols in this directory." Close Visual Studio. Open that directory in Windows Explorer and search for "ucrtbased". Delete all of the PDB files that the search turns up.