Skip to content

Commit dab2f73

Browse files
authored
Remove outdated Docker image section, add local cygdb instruction (#62388)
1 parent 07125ea commit dab2f73

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

doc/source/development/debugging_extensions.rst

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ pandas uses Cython and C/C++ `extension modules <https://docs.python.org/3/exten
1010

1111
For Python developers with limited or no C/C++ experience this can seem a daunting task. Core developer Will Ayd has written a 3 part blog series to help guide you from the standard Python debugger into these other tools:
1212

13-
1. `Fundamental Python Debugging Part 1 - Python <https://willayd.com/fundamental-python-debugging-part-1-python.html>`_
14-
2. `Fundamental Python Debugging Part 2 - Python Extensions <https://willayd.com/fundamental-python-debugging-part-2-python-extensions.html>`_
15-
3. `Fundamental Python Debugging Part 3 - Cython Extensions <https://willayd.com/fundamental-python-debugging-part-3-cython-extensions.html>`_
13+
1. `Fundamental Python Debugging Part 1 - Python <https://willayd.com/fundamental-python-debugging-part-1-python/>`_
14+
2. `Fundamental Python Debugging Part 2 - Python Extensions <https://willayd.com/fundamental-python-debugging-part-2-python-extensions/>`_
15+
3. `Fundamental Python Debugging Part 3 - Cython Extensions <https://willayd.com/fundamental-python-debugging-part-3-cython-extensions/>`_
1616

1717
Debugging locally
1818
-----------------
@@ -22,29 +22,16 @@ By default building pandas from source will generate a release build. To generat
2222
pip install -ve . --no-build-isolation -Cbuilddir="debug" -Csetup-args="-Dbuildtype=debug"
2323

2424
.. note::
25-
2625
conda environments update CFLAGS/CPPFLAGS with flags that are geared towards generating releases, and may work counter towards usage in a development environment. If using conda, you should unset these environment variables via ``export CFLAGS=`` and ``export CPPFLAGS=``
2726

2827
By specifying ``builddir="debug"`` all of the targets will be built and placed in the debug directory relative to the project root. This helps to keep your debug and release artifacts separate; you are of course able to choose a different directory name or omit altogether if you do not care to separate build types.
2928

30-
Using Docker
31-
------------
32-
33-
To simplify the debugging process, pandas has created a Docker image with a debug build of Python and the gdb/Cython debuggers pre-installed. You may either ``docker pull pandas/pandas-debug`` to get access to this image or build it from the ``tooling/debug`` folder locally.
34-
35-
You can then mount your pandas repository into this image via:
36-
37-
.. code-block:: sh
38-
39-
docker run --rm -it -w /data -v ${PWD}:/data pandas/pandas-debug
40-
41-
Inside the image, you can use meson to build/install pandas and place the build artifacts into a ``debug`` folder using a command as follows:
42-
43-
.. code-block:: sh
29+
Using cygdb for Cython debugging
30+
---------------------------------
4431

45-
python -m pip install -ve . --no-build-isolation -Cbuilddir="debug" -Csetup-args="-Dbuildtype=debug"
32+
For debugging Cython extensions, ``cygdb`` is the recommended approach. The ``cygdb`` debugger comes pre-installed with Cython, so if you have Cython installed in your development environment, you should already have access to it.
4633

47-
If planning to use cygdb, the files required by that application are placed within the build folder. So you have to first ``cd`` to the build folder, then start that application.
34+
After building pandas with debug symbols (as shown above), you can use cygdb by navigating to the build folder and starting the debugger:
4835

4936
.. code-block:: sh
5037

0 commit comments

Comments
 (0)