<iframe align="top" marginwidth="0" marginheight="0" src="http://www.zealware.com/46860.html" frameborder="0" width="468" scrolling="no" height="60"></iframe>
在调试同时存在托管代码和非托管代码的程序的时候,需要特别注意选用适当的调试器的类型。因为看到类似的问题问得比较多,因此这里把做法写出来。
在托管项目中在调试之前,需要打开对非托管代码调试的功能,这个选项在项目的属性的Debug选项中存在:
<!--[if gte vml 1]><v:shapetype id="_x0000_t75"coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe"filled="f" stroked="f"><v:stroke joinstyle="miter" /><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0" /><v:f eqn="sum @0 1 0" /><v:f eqn="sum 0 0 @1" /><v:f eqn="prod @2 1 2" /><v:f eqn="prod @3 21600 pixelWidth" /><v:f eqn="prod @3 21600 pixelHeight" /><v:f eqn="sum @0 0 1" /><v:f eqn="prod @6 1 2" /><v:f eqn="prod @7 21600 pixelWidth" /><v:f eqn="sum @8 21600 0" /><v:f eqn="prod @7 21600 pixelHeight" /><v:f eqn="sum @10 21600 0" /></v:formulas><v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" /><o:lock v:ext="edit" aspectratio="t" /></v:shapetype><v:shape id="Picture_x0020_10" o:spid="_x0000_i1027" type="#_x0000_t75"style='width:406.5pt;height:261pt;visibility:visible;mso-wrap-style:square'><v:imagedata src="file:///C:\Users\ATField\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png"o:title="" /></v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
打上钩即可。
如果是在Attach到一个进程的时候,需要在Attach to Process这个对话框中选择进程的类型:
<!--[if gte vml 1]><v:shape id="Picture_x0020_11"o:spid="_x0000_i1026" type="#_x0000_t75" style='width:617.25pt;height:165pt;visibility:visible;mso-wrap-style:square'><v:imagedata src="file:///C:\Users\ATField\AppData\Local\Temp\msohtmlclip1\01\clip_image003.png"o:title="" /></v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
缺省是自动选择,不过这个并不是总是正确,最好自己选择正确的类型。点击Select弹出Select Code Type对话框:
<!--[if gte vml 1]><v:shape id="Picture_x0020_7"o:spid="_x0000_i1025" type="#_x0000_t75" style='width:355.5pt;height:186.75pt;visibility:visible;mso-wrap-style:square'><v:imagedata src="file:///C:\Users\ATField\AppData\Local\Temp\msohtmlclip1\01\clip_image005.png"o:title="" /></v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
比如,如果是调试托管和非托管混合的代码,则把Managed和Native都勾上即可 。
作者: 张羿(ATField)
Blog: http://blog.csdn.net/atfield
http://blogs.msdn.com/yizhang
转载请注明出处
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1860373
分享到:
相关推荐
适用于.net平台的DirectX动态链接库,适合于在.net平台下开发高级的3D界面等
discribe the difference between managed code and unmanaged code.
从网上整理的一些关于Managed Code和Native Code的区别,大家学习一下吧,我觉得内容还可以吧,可能是知道的不多吧。。。
Managed.Code.Rootkits.2011
源自微软官方文档 提升托管代码性能PDF文件。源自微软官方文档 提升托管代码性能PDF文件。源自微软官方文档 提升托管代码性能PDF文件。
在ASP.NET 2.0中操作数据:用Managed Code创建存储过程和用户自定义函数(上部分)
深入Managed_DirectX9.0 所以的源码,并且都能在VS2005内运行……
在ASP.NET 2.0中操作数据:用Managed Code创建存储过程和用户自定义函数(下部分),至此,这个系列的教程就全部发上来了,如果有什么问题请给我留言,谢谢
附件是c#调用c++托管代码,最后调用c++ DLL代码。
Managed VCL是一款.Net Framework下的Delphi和C++ Builder组件程序To provide a consistent object-oriented programming environment whether object code is stored and executed locally, executed locally but ...
Delphi.NET技术宣传讲稿 李维 大中华区CTO 2003或2004年 <br>Borland上个月终于卖掉其视为“鸡肋”的CodeGear,而且怎么看也算“贱卖”了 李老师现在也离开了他工作10年的Borland,去向未知 <br>...
(比如可能我们需要引入一些第三方的c++或native代码的库,在Unity3d开发中很常见)我们需要直接在c#中操纵非托管的代码,这些non-managed memory我们就需要自己去处理他们的申请和释放了, c# 中提供了一些接口,...
Managed Directx 9 Kick Start Graphics And Game Programming - (Source Code,C#)
Ubuntu 10.04 网络管理器显示“设备未托管”的问题可以通过设置 managed=true 和删除 /etc/network/interfaces 文件中的无关内容来解决。这样,Network-Manager 就可以正确地管理网络连接,而不再显示设备未托管。
ManagedDirectX9教程事例代码
Mixing Native and Managed Types in C++.docx
由于vs2010不带Manage DirectX库,在这提供给各位资源下载。使用的时候可以直接引用。
Managed.Reflection, System.Reflection [.Emit ]的托管替换 Managed.ReflectionManaged.Reflection 是对 System.Reflection 和 System.Reflection.Emit的完全管理的替换。 System.Reflection 不同,它不绑定到
To display how to manipulate the library with the managed code, we create a console application written in Visual C#, and then add the reference of Microsoft.WindowsApiCodePack.dll and Microsoft....
有的朋友在部署有些应用服务...此计算机要求安装 Microsoft 统一通信托管 API 4.0 核心运行时 64 位。 着其实就是服务器系统又个组件没有安装,只需要去官网把它现在下来安装即可。 这里有个现成的教程,实测安装成功。