mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
Updated Debugging segfaults and hard to decipher pybind11 bugs (markdown)
parent
d61001ba6a
commit
8eae6eb2a4
@ -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.
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user