3 UNO bindings for the Python programming language.
5 To have much joy debugging Python extensions you need to:
7 + a) edit `pythonloader.py` in your install setting `DEBUG=1` at the top
8 + b) `touch pyuno/source/module/pyuno_runtime.cxx` and `make debug=true` in `pyuno`
10 Then you'll start to see your exceptions on the console instead of them getting
11 lost at the UNO interface.
13 Python also comes with a gdb script
14 `libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so.1.0-gdb.py`
15 that is copied to `instdir` and will be auto-loaded by `gdb`;
16 it provides commands like `py-bt` to get a Python-level backtrace,
17 and `py-print` to print Python variables.
19 Another way to debug Python code is to use `pdb`: edit some initialization
20 function to insert `import pdb; pdb.set_trace()` (somewhere so that it is
21 executed early), then run `soffice` from a terminal and a command-line Python
22 debugger will appear where you can set Python-level breakpoints.