-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
pydrake bazel: How to get a stacktrace in debug mode? #14381
Comments
See example trying to get a stack trace in #14380 Commit: b99ff10
Triggers a segfault. Running it under GDB also doesn't seem to yield useful symbols:
|
Using |
Naively trying out CMake per our docs:
EDIT: Success! That seems to do it:
|
From my comment in Slack:
|
I (or someone else ;) should PR that to Drake docs. |
@EricCousineau-TRI Is there any way to intercept the Bazel strip option which seems a lot more intuitive? |
Yup, good idea! Perhaps there's a way to extract that from cc toolchain information. Just to check, is this something that impacted your workflow? |
I lost a day trying to build libdrake with debug symbols before seeing this |
Ah, sorry to hear that, and yup, that'd be best! |
This doesn't work anymore. I get "No stack" in gdb. I did the following:
Is it because set_log_level is no longer present in current drake? What is the equivalent of set_log_level("trace") now? |
@sloretz is trying to debug some stuff here:
sloretz/drake_ros2_demos#3
I thought #14356 would've fixed it, but possibly not.
He's trying to debug, but can't easily find the point in Drake C++ / pybind11 code where things go awry.
For now, he's trying out the
@traced
macro from here:https://drake.mit.edu/python_bindings.html#debugging-with-the-python-bindings
I am assuming the our
cmake -DCMAKE_BUILD_TYPE=Debug
command isn't doing anything more special than-c dbg
for Bazel; but we shall see...The text was updated successfully, but these errors were encountered: