-
Hi, I am new to bazel and lldb on MacOS and need help with debugging. I have not been able to set breakpoints and get source info in lldb for code compiled with "bazel build --config debug" on MacOS Sequoia 15.5. lldb indicates that my executable does not have debugging symbols. Could someone tell me what need be done more than the below? Thanks. Here's my "MODULE.bazel": And, my ".bazelrc": |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I've got lldb to function again. The below is probably an overkill so it'd be great if some expert can help pare it down. ---- I added this to my ".bazelrc": build:debug --spawn_strategy=local ---- Then, I added this to my ".lldbrc": settings set target.source-map ./ FullPathNameOfTheHomeDirectoryOfTheModule ---- And, finally added an alias in my ".zshrc" to simplfy invoking bazel : alias bazeldbg="bazel build --config debug --copt=-fdebug-prefix-map=$(pwd)=/" ----- For usage, I do something like this in the shell: bazeldbg //test_dir:my_test |
Beta Was this translation helpful? Give feedback.
I've got lldb to function again. The below is probably an overkill so it'd be great if some expert can help pare it down.
---- I added this to my ".bazelrc":
build:debug --spawn_strategy=local
build:debug --sandbox_debug
build:debug --strip=never
build:debug -c dbg
build:debug --features=oso_prefix_is_pwd
build:debug --compilation_mode=dbg
build:debug --copt=-g
build:debug --copt=-O0
build:debug --copt=-fno-omit-frame-pointer
build:debug --fission=no
build --apple_generate_dsym
---- Then, I added this to my ".lldbrc":
settings set target.source-map ./ FullPathNameOfTheHomeDirectoryOfTheModule
---- And, finally added an alias in my ".zshrc" to simplfy invoking bazel :
alias bazeldbg="bazel…