Skip to content

Document generating compile_commands.json for C extensions #50169

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

Merged
merged 3 commits into from
Dec 12, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions doc/source/development/debugging_extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,13 @@ Note that code execution under valgrind will take much longer than usual. While
.. note::

For best results, you should run use a Python installation configured with Valgrind support (--with-valgrind)


Easier code navigation
======================

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>`_.

.. code-block::

bear -- python setup.py build_ext --inplace -j4 --with-debugging-symbols