【问题标题】:How to debug a C++ dll with VisualStudio+cmake如何使用 VisualStudio+cmake 调试 C++ dll
【发布时间】:2022-12-05 19:45:49
【问题描述】:

我正在尝试使用不属于该解决方案的外部应用程序调试 dll。 我正在使用 VisualStudio+cmake 我已经用类似的东西设置了 launch.vs.json:

  {
  "version": "0.2.1",
  "defaults": {},1
  "configurations": [
    {
      "name": "mydll.dll",
      "type": "default",
      "project": "CMakeLists.txt",
      "projectTarget": "mydll.dll",
      "program": "external_program.exe",
      "args": [ "path_to_input_file" ]
    }
  ]
}

它不起作用。 正确的做法是什么?

【问题讨论】:

    标签: c++ visual-studio debugging cmake dll


    【解决方案1】:

    您需要该库的符号才能调试,或者必须使用附加的调试符号构建库(即调试 dll)。 之后,您可以“附加到正在加载 dll 的那个进程”。 how to attach to a process

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-04
      • 2015-02-22
      • 1970-01-01
      • 2013-11-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多