[英]How to debug C++ code in a Windows Phone (8) Runtime Component or C++ DLL in VS 2013
For a solution created using Visual Studio 2013 Pro and containing a Windows Phone App (C#), a Windows Phone Runtime Component (C++) and a Windows Phone Dynamic Link Library (C++), is it possible to debug the C++ code in either the runtime component or the DLL? 对于使用Visual Studio 2013 Pro创建并包含Windows Phone应用程序(C#),Windows Phone运行时组件(C ++)和Windows Phone动态链接库(C ++)的解决方案,是否可以在运行时调试C ++代码组件还是DLL? If so, what must be done to enable it?
如果是这样,必须采取什么措施才能启用它?
I have created such a project - a simple test app, where the app invokes code in the runtime component, which in turn invokes code in the DLL. 我创建了一个这样一个项目 - 一个简单的测试应用程序,应用程序调用运行时组件中的代码,然后调用DLL中的代码。 I can verify that it is working correctly because I can inspect the return value of the C++ function in the DLL after it has been fed back through the runtime component to C# code in the app, but I can't get the debugger to step into the method implemented in the runtime component.
我可以验证它是否正常工作,因为我可以在通过运行时组件反馈到应用程序中的C#代码后检查DLL中C ++函数的返回值,但我无法让调试器进入运行时组件中实现的方法。 Although I can set breakpoints on any of the code (C# or C++), only breakpoints on the C# code ever get hit, and the breakpoints set in C++ code (either runtime component or DLL) show as "no symbols loaded" while the app is active under the debugger (as when sitting on a C# breakpoint).
虽然我可以在任何代码(C#或C ++)上设置断点,但只有C#代码上的断点才会被命中,而在C ++代码中设置的断点(运行时组件或DLL)在应用程序中显示为“无符号加载”在调试器下是活动的(就像坐在C#断点上一样)。
It is possible to debug the c++ code. 可以调试c ++代码。 You must enabled native debugging for the project.
您必须为项目启用本机调试。 Open the project properties and click on the Debug tab.
打开项目属性,然后单击“调试”选项卡。 On the bottom of the right pane will be a section titled Debugger Type.
在右侧窗格的底部将是标题为Debugger Type的部分。 Change the UI Task and/or the Background Task to be Native Only.
将UI任务和/或后台任务更改为仅本机。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.