WinDbg Preview 1.2205版本无法调试.NET Framework程序如何解决
问题概述
版本号为1.2205.18001.0的WinDbg Preview存在已知原生BUG,无法正常调试.NET Framework程序。执行所有.cordll相关命令均返回CLR DLL status: No load attempts提示,多名使用同版本的用户均复现该问题。
该版本调试.NET Core程序可正常运行,但调试.NET Framework时无法正常加载DAC(数据访问组件),即使触发!t命令时自动下载了对应DAC组件,依然无法正常开展调试工作。
问题截图:
复现现象
- 执行强制加载CLR调试模块命令
.cordll -ve -u -l,输出如下:
0:126> .cordll -ve -u -l CLR DLL status: No load attempts
- 直接执行
.cordll查看CLR模块加载状态,输出如下:
0:126> .cordll CLR DLL status: No load attempts
- 手动指定DAC文件路径执行
.cordll -lp D:\dumps,依然返回相同报错:
0:126> .cordll -lp D:\dumps CLR DLL status: No load attempts
- 执行
!t等依赖SOS的调试命令时,报DAC加载失败,错误码0x80004005,完整报错如下:
0:126> !t Failed to load data access DLL, 0x80004005 Verify that 1) you have a recent build of the debugger (6.2.14 or newer) 2) the file mscordacwks.dll that matches your version of clr.dll is in the version directory or on the symbol path 3) or, if you are debugging a dump file, verify that the file mscordacwks_<arch>_<arch>_<version>.dll is on your symbol path. 4) you are debugging on supported cross platform architecture as the dump file. For example, an ARM dump file must be debugged on an X86 or an ARM machine; an AMD64 dump file must be debugged on an AMD64 machine. You can also run the debugger command .cordll to control the debugger's load of mscordacwks.dll. .cordll -ve -u -l will do a verbose reload. If that succeeds, the SOS command should work on retry. If you are debugging a minidump, you need to make sure that your executable path is pointing to clr.dll as well.
解决方案
该问题是版本更新引入的加载逻辑缺陷,调整符号路径、手动放置DAC文件等配置操作均无法修复,可通过以下方式解决:
- 回退WinDbg Preview版本:打开Microsoft Store找到WinDbg Preview,卸载当前
1.2205.18001.0版本,安装1.2204系列及更早的正常版本即可恢复.NET Framework调试能力,回退前建议备份自定义的调试工作区、符号路径、扩展配置。 - 换用经典版WinDbg:使用Windows SDK附带的正式版WinDbg(非Preview版本)调试.NET Framework程序,该版本不存在此CLR加载缺陷,提前配置好对应CLR版本的SOS.dll、mscordacwks.dll路径即可正常使用所有调试命令。
- 等待官方推送修复:该BUG已被大量用户反馈至微软WinDbg团队,后续商店推送的新版本会修复该问题,非紧急调试场景可等待版本更新后升级使用。
内容的提问来源于stack exchange,提问作者dotnetfly
相关产品推荐
相关产品推荐

