2

TL;DR: Where do I find the MS source files that are referenced as d:\th\minkernel\crts\ucrt\... when debugging in Visual Studio 2015.

I'm trying to debug into a CRT call to see what MS is actually doing, and unfortunately it seems the ucrt source files are not available with an installation of VS2015. At least I cannot find these files in C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\crt\src at all.

Is the (mostly) full source set of the MS CRT still available somewhere as it used to be at least up to VS2010, or are some parts of the CRT now fully closed source?

Martin Ba
  • 37,187
  • 33
  • 183
  • 337
  • 1
    I have it in C:\Program Files (x86)\Windows Kits\10\Source\10.0.xxxxx.0\ucrt – Hans Passant Mar 01 '18 at 12:54
  • That was my question too. Thanks for pointing the source location, but there is another question: in VS2008, I could step into these CRT sources during debug, e.g.: `setLocale` call goes deep into CRT source, while on VS2015, it just steps over, instead of into. I thought because no source, but you showed the source location, that's nice, but how can I ask VS2015 to debug into these source files just like the old VS2008 did? – Zoli Oct 11 '18 at 07:36

1 Answers1

4

Answered on MSDN by RLWA32:

The ucrt source can be found under the Windows Kits folder. For example, in a 32 bit VM with VS2015 installed the path to the ucrt source is - C:\Program Files\Windows Kits\10\Source\10.0.10240.0\ucrt.

You can find the path by examining the VC++ directories property for any C+ project -

$(VC_SourcePath)

This folder is in fact on Program Files (x86) on my machine, but it's there.

I missed it, because there is another folder C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\... and this one doesn't contain any sources.

Community
  • 1
  • 1
Martin Ba
  • 37,187
  • 33
  • 183
  • 337