From 8eae6eb2a48d6850b63804dc4da9977e9a10dcd9 Mon Sep 17 00:00:00 2001 From: Eric Cousineau Date: Thu, 4 Mar 2021 17:06:21 -0500 Subject: [PATCH] Updated Debugging segfaults and hard to decipher pybind11 bugs (markdown) --- Debugging-segfaults-and-hard-to-decipher-pybind11-bugs.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Debugging-segfaults-and-hard-to-decipher-pybind11-bugs.md b/Debugging-segfaults-and-hard-to-decipher-pybind11-bugs.md index 972ce27..5662a2d 100644 --- a/Debugging-segfaults-and-hard-to-decipher-pybind11-bugs.md +++ b/Debugging-segfaults-and-hard-to-decipher-pybind11-bugs.md @@ -2,7 +2,7 @@ This is meant to aide in debugging hard-to-decipher pybind11 bugs (or surprises ## Tracing Python Executions -Generally, it's easiest to get a sense of where things are failing by using the `trace` module. Here's some code that can be copied+pasted. For examples here, assume these functions are defined in `debug.py`: +Generally, it's easiest to get a sense of where things are failing by using the `trace` module. Here's some code that can be copied+pasted. For examples here, assume these functions are defined in `debug.py` (Python 3.5+ only): ```py """ @@ -48,6 +48,7 @@ def traced(func, ignoredirs=None): Usage of this could look like the following: ```sh +import debug import my_crazy_cool_module # Say this has bindings buried 3 levels deep.