Skip to content

Commit 63e50d5

Browse files
authored
Document generating compile_commands.json for C extensions (#50169)
* Added quick blurb on using bear for C extensions debugging * Edits * shell block
1 parent e3143f6 commit 63e50d5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/source/development/debugging_extensions.rst

+10
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,13 @@ Note that code execution under valgrind will take much longer than usual. While
119119
.. note::
120120

121121
For best results, you should run use a Python installation configured with Valgrind support (--with-valgrind)
122+
123+
124+
Easier code navigation
125+
======================
126+
127+
Generating a ``compile_commands.json`` file may make it easier to navigate the C extensions, as this allows your code editor to list references, jump to definitions, etc... To make this work with setuptools you can use `Bear <https://github.com/rizsotto/Bear>`_.
128+
129+
.. code-block:: sh
130+
131+
bear -- python setup.py build_ext --inplace -j4 --with-debugging-symbols

0 commit comments

Comments
 (0)