c# - 调试c++ dll时找不到调试信息

标签 c# c++ dll debug-information

那里: 应用程序是从 C# 构建的,而 Dll 是从 C++ 构建的,它们在不同的解决方案中。当我启动 Dll 的调试器时,总是弹出一个消息框,提示“找不到或不匹配‘App.exe’的调试信息。已跳过加载 NGen 二进制文件的符号。”

谢谢。

附注我已尝试将 App.pdb 放在多个位置,但仍然无法正常工作。

最佳答案

正如 ortang 评论的那样,您需要在构建项目时激活调试信息。

参见“/DEBUG (Generate Debug Info) (Visual Studio 2013)”:

The /DEBUG option creates debugging information for the .exe file or DLL.

The linker puts the debugging information into a program database (PDB). It updates the PDB during subsequent builds of the program.

It is not possible to create an .exe or .dll that contains debug information.
Debug information is always placed in a .pdb file.
To set this linker option in the Visual Studio development environment

  • Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
  • Click the Linker folder.
  • Click the Debugging property page.
  • Modify the Generate Debug Info property.

关于c# - 调试c++ dll时找不到调试信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19903126/

相关文章:

c# - 关于继承和运算符重载的 OOP 设计问题

c++ - 不打电话就工作的过分热心的方法? C++ Glut初始化变得流氓

c++ - 我的 friend 功能没有执行

c++ - C++ 如何处理递归类定义?

c# - 将 char * 参数传递给 C# 函数

c - TclLib C DLL,避免 Tcl_DuplicateObj,调用时出现共享对象错误

c# - AppFabric 缓存服务器和 Web 应用程序在同一台物理机器上

c# - C#中wav文件播放循环之间的间隔

c# - 获取重叠间隔的持续时间

java - 如何在 Mac OS X 中使用带有 Java 的 Windows DLL?