[Zope] Debugger into python products with ZEO2 on win32

Jeff Kowalczyk jtk@yahoo.com
Thu, 3 Oct 2002 10:42:04 -0400


I have CVS ZEO2, Zope 2.5.1 running on WinXP, PythonWin for Python 2.1 installed.
I need to learn how to use a debugger to get information on what's happening on live
objects (i.e when a form is submitted, I'd like to view the request and step through)

Specifically I have a strange string.strip() error that just popped up on a customized
Formulator product I'm working on, and I figure I should be able to debug this better than
the traceback (see below).

I can open up PythonWin or zope's console python and after Import Zope'ing, I can access
the object model. While that's been invaluable as a sort of offline code-completion, that
really isn't helping me debug live object behavior, which is where I'm running into some
diffuculty as my product comes into shape.

I'd really like to learn how to do this with the console or PythonWin, rather than use
WingIDE or another IDE, but whatever it takes I'll do. With the setup I have, is there
anything I can do to debug what happens at a specific request like the one described here?

Zope has encountered an error while publishing this resource.
Error Type: AttributeError
Error Value: strip
Traceback (innermost last):
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 150, in publish_module
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 114, in publish
  File C:\PROGRA~1\Zope\lib\python\Zope\__init__.py, line 159, in
zpublisher_exception_hook
    (Object: dt1)
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 98, in publish
  File C:\PROGRA~1\Zope\lib\python\ZPublisher\mapply.py, line 88, in mapply
    (Object: manage_edit)
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 39, in call_object
    (Object: manage_edit)
  File C:\Program Files\Zope\lib\python\Products\MyFormulatorExt\Field.py, line 267, in
manage_edit
    (Object: dt1)
  File C:\Program Files\Zope\lib\python\Products\MyFormulatorExt\Form.py, line 270, in
validate
  File C:\Program Files\Zope\lib\python\Products\MyFormulatorExt\Field.py, line 215, in
validate
    (Object: default)
  File C:\Program Files\Zope\lib\python\Products\MyFormulatorExt\Field.py, line 204, in
_validate_helper
    (Object: default)
  File C:\Program Files\Zope\lib\python\Products\MyFormulatorExt\Validator.py, line 546,
in validate
  File C:\Program Files\Zope\lib\python\Products\MyFormulatorExt\Field.py, line 221, in
validate_sub_field
    (Object: default)
  File C:\Program Files\Zope\lib\python\Products\MyFormulatorExt\Field.py, line 204, in
_validate_helper
    (Object: hour)
  File C:\Program Files\Zope\lib\python\Products\MyFormulatorExt\Validator.py, line 191,
in validate
  File C:\Program Files\Zope\lib\python\Products\MyFormulatorExt\Validator.py, line 55, in
validate
  File C:\Program Files\Zope/bin/lib\string.py, line 80, in strip
AttributeError: (see above)