-
Notifications
You must be signed in to change notification settings - Fork 301
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
Add wrappers for gdb and lldb when invoked from bazel #508
Conversation
Usage: $ bazel run --run_under $(realpath tools/bazel-gdb-wrapper.sh) //src/workerd/server:workerd -- \ serve $(realpath /samples/helloworld_esm/config.capnp)
642e0e6
to
f1f602e
Compare
Is this perhaps worth a mention in the README, perhaps under "Running workerd"? |
While we're at it it might be worth encouraging users to set up a bazel |
# | ||
# Example command-line invocation: | ||
# | ||
# bazel run -c dbg --spawn_strategy=local --features=oso_prefix_is_pwd --run_under \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment suggests to me that the features
flag alone is sufficient and we should be able to at least do away with the local
spawn_strategy
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I cannot tell you how much time I wasted with this OSX only issue, it does indeed appear redundant.
Perhaps better in a separate CL and/or separate tips.md under |
I've decided to drop this. The changes are fairly trivial and actually don't work for debugging tests, bazel runs tests with a wrapper around your wrapper if you invoke (on an OS-X box):
Bazel runs:
And the bazel For binaries, there is no equivalent wrapper on the bazel side so debugging binaries work. The main binary here is workerd and we have support for debugging that from vscode which is much more convenient than gdb / lldb at the command-line. |
Usage:
$ bazel run --run_under $(realpath tools/bazel-gdb-wrapper.sh) //src/workerd/server:workerd --
serve $(realpath /samples/helloworld_esm/config.capnp)