User:Babbage Linden/Django/Debugging

From Second Life Wiki
Revision as of 08:35, 2 December 2008 by Babbage Linden (talk | contribs) (New page: Django provides [http://simonwillison.net/2008/May/22/debugging/ lots of debugging] facilities. When an error occurs during development the default 500 template provides error descriptio...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Django provides lots of debugging facilities.

When an error occurs during development the default 500 template provides error descriptions, stack traces with expandable code sites and detailed request information.

The test client can be used in the interactive debugger to examine responses.

import pdb; pdb.set_trace()

Can be inserted in code to cause the development server to drop in to the interactive debugger.

Django version 1.0.1 final, using settings 'region-django.settings'
Development server is running at http://station-etch-3:9999/
Quit the server with CONTROL-C.
> /var/tmp/babbage/scalable-space-services-1/indra/web/apps/region-django/presence/rest.py(16)region_GET()
-> return {'region_id': simulator.region_id,
(Pdb)

SQL queries executed by django can be examined.