Django debugging with Emacs

前端 未结 6 908
小鲜肉
小鲜肉 2021-01-30 02:59

I found a lot of info about how to debug simple Python programs with Emacs. But what if I want to debug a Django application? I run the development server and I would like to so

6条回答
  •  一整个雨季
    2021-01-30 03:13

    Here's something I found last night that will do exactly what you want when the program crashes:

    http://code.google.com/p/django-command-extensions/

    Once you install that you can run:

    python manage.py runserver_plus

    and you will have an interactive AJAX console on your Error page. (Obviously, be careful with the amount of access people have to this web server when running in that mode.)

    GitHub: https://github.com/django-extensions/django-extensions

    You can get Django Extensions by using pip or easy_install:

    $ pip install django-extensions or $ easy_install django-extensions

    If you want to install it from source, grab the git repository from GitHub and run setup.py:

    $ git clone git://github.com/django-extensions/django-extensions.git
    $ cd django-extensions
    $ python setup.py install

提交回复
热议问题