【问题标题】:No debugging symbols found in Visual Studio when built C program with Bazel(Windows)No debugging symbols found in Visual Studio when built C program with Bazel(Windows)
【发布时间】:2022-12-01 21:09:15
【问题描述】:

I have simple C program. I want to build and debug C program using Bazel on Windows within Visual Studio Code . But getting error as: (No debugging symbols found in bazel-bin/examples/application/application). How can I get Symbols. I have cc_binary :

cc_bin`enter code here`ary(
  name = "main",
  srcs = glob(["*.c"]),
  deps = [
    "//examples/sub_main",
  ],
  visibility = ["//visibility:public"],
)

I'm using following command to build and debug. bazel build --compilation_mode=dbg //examples/main --strip=never gdb bazel-bin/examples/main/main But I'm getting error as: (No debugging symbols found in bazel-bin/examples/application/application) Even after using compilation_mode ad dbg why is it not generating any Symbols? How can I get symbols to debug? Please help

【问题讨论】:

    标签: visual-studio-code gdb bazel


    【解决方案1】:

    Please refer this link

    Answer : You need to add "build --linkopt /debug" to your .bazelrc file.

    【讨论】:

      猜你喜欢
      • 2022-12-01
      • 1970-01-01
      • 2021-01-30
      • 2012-11-07
      • 2015-04-17
      • 2010-10-31
      • 2022-12-24
      • 2019-01-03
      • 1970-01-01
      相关资源
      最近更新 更多