You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/development/debugging_extensions.rst
+28-2
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,8 @@ For Python developers with limited or no C/C++ experience this can seem a daunti
14
14
2. `Fundamental Python Debugging Part 2 - Python Extensions <https://willayd.com/fundamental-python-debugging-part-2-python-extensions.html>`_
15
15
3. `Fundamental Python Debugging Part 3 - Cython Extensions <https://willayd.com/fundamental-python-debugging-part-3-cython-extensions.html>`_
16
16
17
-
Generating debug builds
18
-
-----------------------
17
+
Debugging locally
18
+
-----------------
19
19
20
20
By default building pandas from source will generate a release build. To generate a development build you can type::
21
21
@@ -27,6 +27,32 @@ By default building pandas from source will generate a release build. To generat
27
27
28
28
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.
29
29
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 locallly.
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:
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.
48
+
49
+
.. code-block:: sh
50
+
51
+
cd debug
52
+
cygdb
53
+
54
+
Within the debugger you can use `cygdb commands <https://docs.cython.org/en/latest/src/userguide/debugging.html#using-the-debugger>`_ to navigate cython extensions.
0 commit comments