From 9a9bc235f0591a1ebeb8bab01273e7a330215475 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Mon, 23 Feb 2026 17:36:37 +0100 Subject: [PATCH 1/5] docs: Add debugging advice --- CONTRIBUTING.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cf35461b0b..00aac2fcb2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -106,6 +106,26 @@ In general, you use tox -p auto -o -e -- ``` +## Debugging + +Normal Python breakpoints using `breakpoint()` will drop you into `pdb`. +To inspect extension module code at runtime `lldb` is useful. +For example, to debug a Django application that interfaces with uWSGI, build uWSGI with debug symbols using + +```bash +CFLAGS="-g -O0" python uwsgiconfig.py --build +``` + +and then run the Django app with `lldb` using a command analogous to the following (with paths updated) + +```bash +lldb -- ../../uwsgi/uwsgi --pythonpath "$PWD/.venv/lib/python3.14/site-packages" \ + --http :8000 \ + --module mysite.wsgi:application \ + --home "$PWD/.venv" \ + --need-app \ +``` + ## Adding a New Integration ### SDK Contract From cf553f47573d5b0d0a31939457917a262d45af7c Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Mon, 23 Feb 2026 17:37:51 +0100 Subject: [PATCH 2/5] . --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 00aac2fcb2..47f9deb68d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -108,7 +108,7 @@ tox -p auto -o -e -- ## Debugging -Normal Python breakpoints using `breakpoint()` will drop you into `pdb`. +Normal Python breakpoints using `breakpoint()` will drop you into `pdb` by default. To inspect extension module code at runtime `lldb` is useful. For example, to debug a Django application that interfaces with uWSGI, build uWSGI with debug symbols using From d200fa94fad72b29428e3db8e6e55f5fba8e71c6 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Mon, 23 Feb 2026 17:41:12 +0100 Subject: [PATCH 3/5] . --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 47f9deb68d..663f7082fc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -109,7 +109,7 @@ tox -p auto -o -e -- ## Debugging Normal Python breakpoints using `breakpoint()` will drop you into `pdb` by default. -To inspect extension module code at runtime `lldb` is useful. +To inspect C application like uWSGI or extension module code at runtime `lldb` is useful. For example, to debug a Django application that interfaces with uWSGI, build uWSGI with debug symbols using ```bash From 95e71db13514f40ff7a0ca363cc9a6cce5bc5302 Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Mon, 23 Feb 2026 17:45:55 +0100 Subject: [PATCH 4/5] . --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 663f7082fc..02ca27903d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -109,7 +109,7 @@ tox -p auto -o -e -- ## Debugging Normal Python breakpoints using `breakpoint()` will drop you into `pdb` by default. -To inspect C application like uWSGI or extension module code at runtime `lldb` is useful. +To inspect C applications like uWSGI or extension module code at runtime `lldb` is useful. For example, to debug a Django application that interfaces with uWSGI, build uWSGI with debug symbols using ```bash From 4ae6b1c6cde8fbd7deebb5102d6024d9513d41ff Mon Sep 17 00:00:00 2001 From: Alexander Alderman Webb Date: Mon, 23 Feb 2026 17:54:50 +0100 Subject: [PATCH 5/5] . --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 02ca27903d..d7ee48b14f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -109,7 +109,7 @@ tox -p auto -o -e -- ## Debugging Normal Python breakpoints using `breakpoint()` will drop you into `pdb` by default. -To inspect C applications like uWSGI or extension module code at runtime `lldb` is useful. +To inspect C applications like uWSGI or extension module code at runtime, `lldb` is useful. For example, to debug a Django application that interfaces with uWSGI, build uWSGI with debug symbols using ```bash