How do I dump the .NET process so that Visual Stud

2019-08-23 02:05发布

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 );
...

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 )

1条回答
劳资没心,怎么记你
2楼-- · 2019-08-23 02:27

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.

查看更多
登录 后发表回答