How to debug Django app that runs on top of TLS/SSL?
===

What is the best way to debug a Django app that runs on top of TLS/SSL?

Background:

I have a Django web app that uses X.509 client side certificates for authentication. When running under Apache, my app can only be reached via HTTPS. Clients that connect to the app provide a client side certificate which Apache validates and then forwards to the app in an environment variable. The app parses the certificate and provides access controlled content.

So far, I have only been able to debug the app under regular HTTP, with "./manage.py runserver". I have simulated an HTTPS connection by using a custom view handler middleware that kicks in, in debug mode. The view handler adds information to the request, similar to the information that would be parsed out of an actual client side certificate when run under HTTPS.

It would make debugging much easier for me if I could debug with the actual client side certificates that clients provide when connecting via HTTPS.