问题描述
我试图创建一个小型转储在管理的过程中,这将是加载到Visual Studio 2008。我用下面的code创建转储:
I'm trying to create a minidump of the managed process, which would be loadable into Visual Studio 2008. I'm using following code to create a minidump:
...
MINIDUMP_TYPE dumpType = static_cast< MINIDUMP_TYPE >(
MiniDumpWithFullMemory | MiniDumpWithDataSegs | MiniDumpWithHandleData |
MiniDumpWithProcessThreadData | MiniDumpWithPrivateReadWriteMemory );
BOOL bSuccess = MiniDumpWriteDump(
hProcess, dwProcessID, hFile, dumpType, NULL, NULL, NULL );
...
我尝试了很多MINIDUMP_TYPE的其他组合,但没有得到我什么,我想:要能够加载转储文件到Visual Studio,使管理code显示出来,它的方式做,当你附加到进程。转储文件是越来越加载,我可以用它作为本机code。但是,当我试图把它作为管理code调试( http://vvcap.net/db /gkqmlA9qbQIK47-patap.htp ),我收到以下错误:指定的文件是无法识别或不支持的二进制格式(的)
I tried a lot of other combinations of MINIDUMP_TYPE, but none yielded me what I wanted: to be able to load dump file into Visual Studio, so that a managed code shows up, the way it does when you "attach to process". Dump file is getting loaded and I can use it as a native code. But when I try to debug it as managed code ( http://vvcap.net/db/gkqmlA9qbQIK47-patap.htp ), I'm receiving following error: "The specified file is an unrecognized or unsupported binary format" ( http://vvcap.net/db/lw5cEvSMl3yiiHRkt87R.htp )
推荐答案
管理转储调试没有的Visual Studio 2008的支持功能,至少调试它作为管理code不是。可以使用WinDbg到有限的程度上对于这种类型的文件。
Managed dump debugging is not a supported feature of Visual Studio 2008. At least debugging it as managed code is not. You can use WinDbg to a limited extent for this type of file.
这篇关于我如何转储.NET过程,使Visual Studio 2008中会加载它作为一个管理的转储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!