-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dlv problem #993
Comments
At the moment, I can't reproduce this because dlv is getting killed on my mac (bad Xcode upgrade?). We're both at a conference this week, so we may be slow to address this. |
@jayconrod if your received problem about lldb-server, just run
It will solve problem |
Reproduced. The dlv thing was a linker issue. Downloading a new Go SDK fixed it. Could you try building with |
My build file is following (generated by gazelle)
Probably, it can be fixed easy in build file but is also means we have some problem with gazelle. |
Not sure if that's a problem with the rules or with Gazelle. Could you post the |
@jayconrod these rules generated by gazelle by following settings
|
Reproduced. This is a problem with the rules, not Gazelle. It only fails with |
Use the deps, not the direct dependancies of the deps Fixes reported in person issue with pure="on" Get the toolchain_flags from the rule not the aspect Fixes bazelbuild#993
Use the deps, not the direct dependancies of the deps Fixes reported in person issue with pure="on" Get the toolchain_flags from the rule not the aspect Fixes bazelbuild#993
Use the deps, not the direct dependancies of the deps Fixes reported in person issue with pure="on" Get the toolchain_flags from the rule not the aspect Fixes #993
Still have problem.
build with "-c dbg" works, but delve can not attach Can you please reopen bug? |
@ianthehat @jayconrod can you please re-open bug? |
I can't reproduce the problem, I can correctly debug a binary built using |
@ianthehat interesting. After clean --expunge problem was solved. Sorry for stupid question, but what the difference between plain build and build with "-c dbg"? Would be ok if I add "build -c dbg" to tools/bazel.rc or some unobvious consequences exist? |
@ianthehat @jayconrod by the way, documentation about "-c" option missed: What does this option mean? |
-c is the short form of --compilation_mode in debug mode we disable stripping and also inlining (you can control just stripping with --strip instead) Note that you can also use --run_under
where bazel-run is the bazel run wrapper script you can get using
and that's nice and easy to alias to bazel-dlv or something |
|
I would strongly recommend that for building production binaries you are using If you are willing to bear the cost of debug binaries for the benefits of debuggable servers, then that is fine, and you should add -c dbg to your release building scripts. |
Thank you! |
Hello,
I am trying to debug my golang program by dlv on OSX.
bazel 0.7.0, rules_go latest.
If I build program by bazel, I receive error
I found same issue for dlv:
https://github.com/derekparker/delve/issues/79
But static linking does not work on OSX (according to rules_go documentation).
If I build program by
dlv able to attach to my program
How to build golang binaries in bazel on OSX for working with dlv?
Thank you
The text was updated successfully, but these errors were encountered: