1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | from django.template import Library, Node
register = Library()
class PydevDebugNode(Node):
def render(self, context):
try:
import pydevd #@UnresolvedImport
pydevd.connected = True
pydevd.settrace()
return ''
except:
# It might be more clear to just let this exception pass through
return 'Debugger was not turned on'
@register.tag
def pydev_debug(parser, token):
return PydevDebugNode()
|
More like this
- Template context debugger with (I)Pdb by denis 3 years, 11 months ago
- manage.py for eclipse with pydev debugging by nickvlku 3 years, 11 months ago
- Updated - Template context debugger with (I)Pdb by dnordberg 3 years, 9 months ago
- testdata tag for templates by showell 4 years ago
- make templates fail loudly in dev by showell 4 years ago
Comments