为什么在加载extern dll时停止VS2010调试器? [英] Why VS2010 debugger is stopped when extern dll is loaded?
问题描述
我将我的VS2008解决方案中的2个转换为VS2010 .NET 4客户端框架.一种解决方案是完全托管(C#),另一种则是混合解决方案.
现在,我的调试器可以正常工作,直到引用了extern dll中的对象或cpp项目中的对象.然后应用程序冻结.
如果选择启用非托管代码调试",则会从extern dll中命中断点(为什么?),因此我可以选择继续".但是我无法更改代码,因为非托管代码调试不允许这样做.
使用该选项,引用cpp对象仍然会导致应用程序冻结.
如果我没有调试就开始调试(CTRL + F5),一切正常!但是我想使用调试器,以便在调试时可以更改代码.
I converted 2 of my VS2008 solutions to VS2010 .NET 4 Client Framework. One solution is full managed (C#) and another is mixed.
Now my debugger works fine until object from extern dll or object from cpp project is referenced. Then application freezes.
If I choose Enable unmanaged code debugging then breakpoint is hit from extern dll (why?) and I can choose continue. But I cannot change code because unmanaged code debugging doesn''t allow that.
With that option referencing cpp object still causes application to freeze.
If I start without debbuging (CTRL+F5) everything works fine! But i want to use debugger so I can change code while debugging.
推荐答案
您无法更改代码,因为您处于托管和非托管两个单独的环境中.您正在调试的主应用程序线程是一个托管应用程序,仅具有非托管代码的引用和调试符号,没有编辑器文件.
当然CTRL + F5可以工作,因为您当然不使用调试器.
You can''t change the code because you are in two separate environments, managed and unmanaged. Your main application thread, the one you are debugging, is a managed application and only has the references and debug symbols for the unmanaged code, it doesn''t have the editor files.
Of course CTRL+F5 works because you are of course not using the debugger.
这篇关于为什么在加载extern dll时停止VS2010调试器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!