From: Patrick Smith <patrick.smith@ca...> - 2006-12-08 21:20:17
I've been trying out BoaConstructor v0.5.2 for some Zope/Plone development on
I can run a zope instance from within BoaConstructor as a module but am unable
to debug, break, and step through the code. I only seem to be able to do this if
I have an application that I am working with. Any pointers as to how I can make
the existing Zope code into an application so I can debug it in BoaConstructor?
Is anyone using BoaConstructor for Zope 2.9 or Zope3 development?
From: Pavel Reznicek <pavel.jindrich@ti...> - 2007-01-11 21:34:40
Patrick Smith napsal(a):
> I've been trying out BoaConstructor v0.5.2 for some Zope/Plone development on
> I can run a zope instance from within BoaConstructor as a module but am unable
> to debug, break, and step through the code. I only seem to be able to do this if
> I have an application that I am working with. Any pointers as to how I can make
> the existing Zope code into an application so I can debug it in BoaConstructor?
> Is anyone using BoaConstructor for Zope 2.9 or Zope3 development?
> Patrick Smith
I tried once to do so but watched the same behavior with Zope 2.8 along
with some other problems (a bug during saving to Zope; then after my
workaround there occurred losses of important script attributes after a
successful save) so I broke up the experiments pretty soon and now, I
write all the Zope code inside my Firefox browser in the Zope Management
Interface (ZMI). Not too comfortable but working.
I think boa-constructor's support of Zope is still basic and
experimental. But I would welcome some improvements in this area too.
A bit theory and thoughts to inspire you or the developers' team:
I still cannot imagine the debugging inside Zope unless you consider
debugging Zope itself. The Zope "Python Script"-s there, as you know,
are interpreted in Restricted Python, which is interpreted in (or at
least controlled by) the real Python. And Zope itself is a Python
application, run and interpreted typically by your system-wide installed
Python interpreter. So if you want to trace through the Python Script
code you have to do so
1) from Zope directly (i. e., by a special Zope Product/object class) or
2) by attaching to the Zope process itself by the debugger (i. e. by the
future boa-constructor), skipping all the inner Zope code and stopping
only when interpreting a Python Script line. The debugging of a Python
External Method that are written in pure (and real) Python would be i.
m. o. a bit easier. But you still need to attach to the running Zope
instance (or to start another instance dynamically and connect to it by
Both approaches would require to write a special debugger (or a special
run mode of an existing debugger) for Zope.
1) Maybe there are some Zope Products that are in fact whole internal
debuggers for Zope but I am not aware of such tools. Ask Mr. Google.
2) I think it would cost much time of ant-like work to make boa able to
debug Zope's Python Scripts and External Methods directly. You can still
try to debug Zope itself while running your Zope Scripts or Ext. Methods
but I think it isn't a good idea because it would mean to search for a
needle in a heap of hay or to pick violets by dynamite.
That would be great if there was someone who would want to go into this
adventure. I'm sorry I don't have enough time to follow.