[Zope] - debugging notes, part 2

Simon Michael simon@joyful.com
Tue, 5 Jan 1999 07:59:45 -0800


Ok, so now I can debug zope in emacs, and set breakpoints where I want.

Back to the earlier problem! Some breakpoints which I think should get hit,
do not get hit. Eg, a breakpoint on my external method. I don't yet know why
this happens.

*TWO MORE MISC CHANGES:

- So that I could run Test.py with the '-t' flag on windows, I changed
instances of '/dev/null' to '/zopetest.tmp'

- For quicker debugging, I made a change at ExternalMethod/ExternalMethod.py
line 244, to reload external methods every time:

# SKWM - always reload (todo: check debug flag)
#        try: f=self._v_f
#        except: f=self.getFunction()
        f=self.getFunction(1,1)

*SWITCHED TO PDOCUMENTTEMPLATE

- I tried again to step through zope's publishing process and into my
method.. still haven't quite managed it.

- I thought, "well it goes through c code at some point (cDocumentTemplate)
and maybe that's confusing the debugger". Not to mention me. So, in order to
try pDocumentTemplate, I:

- renamed lib/python/DocumentTemplate/cDocumentTemplate.pyd (to hide it);

- changed DT_Util.py:

#SKWM
#except: from pDocumentTemplate import InstanceDict, TemplateDict,
render_blocks
except:
    from pDocumentTemplate import InstanceDict, TemplateDict, render_blocks
    class cDocument: pass

- made a fix, or at least a change, in pDocumentTemplate.py, line 159
(allowed me to manage Documents again) :

#SKWM           r=str(inst)
            r=str(inst)

- And now, zope appears to run fine using the pDocumentTemplate and I can
step through it as far as I want. As before, some breakpoints which I would
expect to get hit, don't.

- With one exception - running with pDocumentTemplate appears to break
access control. Same with BOBO_DEBUG_MODE=1.


On with the battle! Advice welcome!

-Simon