How do I debug .NET 4.6 framework source code in Visual Studio 2017?

Here is the answer, thanks to Hans Passant. Note that this solution raises additional questions. Ensure https://referencesource.microsoft.com/ contains the exact version you’re debugging. How? Reference source specifies “.NET Framework 4.6.2” but a module version is something like: “4.6.1586.0” You may need to uninstall security updates as explained here: How do you enable “Enable .NET Framework … Read more

Is there a known issue relating to Windows 7 Kernel Symbols?

Update 2015-10-22: With the Microsoft patch day (2015-10-13) and KB3088195, symbols are available again. However, symbols for the broken version have not been provided, so below may still be useful. Microsoft has already published “good” symbols for ntdll in the past, containing type information like _TEB or _KPRCB. Starting from mid of July 2015, Microsoft … Read more

Trying to debug Windows Store App from dump files

ok, with the help of the Windbg Extension PDE.dll from Andrew Richards, I see that your application crashes because of an not handled System.UnauthorizedAccessException. I used !PDE.dpx -dse to shows all Stowed Exceptions (those 0xC000027B exceptions): 0:006> !PDE.dpx -dse Start memory scan : 0x0551fc7c ($csp) End memory scan : 0x05520000 (User Stack Base) 0x0551fc94 : … Read more

How can I tell if a library was compiled with -g?

If you’re running on Linux, use objdump –debugging. There should be an entry for each object file in the library. For object files without debugging symbols, you’ll see something like: objdump –debugging libvoidincr.a In archive libvoidincr.a: voidincr.o: file format elf64-x86-64 If there are debugging symbols, the output will be much more verbose.

How to tell if a .NET application was compiled in DEBUG or RELEASE mode?

I blogged this a long time ago, and I don’t know if it still valid or not, but the code is something like… private void testfile(string file) { if(isAssemblyDebugBuild(file)) { MessageBox.Show(String.Format(“{0} seems to be a debug build”,file)); } else { MessageBox.Show(String.Format(“{0} seems to be a release build”,file)); } } private bool isAssemblyDebugBuild(string filename) { return … Read more