简体   繁体   English

如何在Windows Phone中调试C ++代码(8)运行时组件或VS 2013中的C ++ DLL

[英]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.

相关问题 如何在C ++运行时组件中的Windows Phone 8.1 XAML应用程序中使用C ++ DLL - How to use a C++ dll in Windows Phone 8.1 XAML App within C++ Runtime Component 用于Windows Phone的Microsoft Visual C ++ 2013运行时包丢失 - Microsoft Visual C++ 2013 Runtime Package for Windows Phone missing C#和C ++之间的Windows(电话)运行时组件流 - Windows (Phone) Runtime Component stream between C# and C++ 从C#调试C ++ dll在VS2013中有效,但在VS2010中无效 - Debug C++ dll from C# works in VS2013, but not VS2010 How to import C++ Legacy DLL in C# UWP application without Windows Runtime Component - How to import C++ Legacy DLL in C# UWP application without Windows Runtime Component 如何在Windows Phone 8(C#)框架中添加C ++ DLL - How to add a C++ DLL in Windows Phone 8 (C#) Framework 将c ++ dll导入windows phone项目 - import c++ dll to windows phone project 调试信息(断点等)存储在VS2013本机C ++ dll项目中的位置在哪里? - Where is location that Debug info (break point, etc) was stored in VS2013, native C++ dll project? 如何在Windows Phone项目中导入C ++ dll - How to import C++ dll in Windows Phone Project 在VS 2013 Project中引用第三方C ++ DLL - Reference 3rd-party C++ DLL into VS 2013 Project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM