Log in |
Debugging Zope with KomodoNote: please see tested platforms. Step 1: Install Komodo http://www.ActiveState.com/Komodo.Komodo requires:
Step 2: Install Zope http://www.zope.org.Step 3: Configure Zope to Komodo.
Step 4: Debugging an External Method:
In your external method add the following line: import callkomodoAnywhere in your External Method you can now call: callkomodo.brk()This is a break point that the Komodo debugger will stop at. Run your external method. Use the debugger options in Komodo. Example image: KomodoDebuggerEM.png Notes:
Example: view_source.py view_source.py is a funky little python script that allows you to browse the dtml source of a Zope installation. This file is available here: ViewSource Copy this file into the Extensions folder of your Zope installation. Create an External Method, id: view_source, module name: view_source, function name: view_source. Add a breakpoint in the view_source method (don't forget to add in callkomodo). Example: acquistion fun You can't actually debug acquisition but you can see the effects up close by looking at the current objects .self variable in Komodo. The easiest way to do this is put callkomodo.brk() in a DTMLMethod: File: Zope Installation \lib\python\OFS\DTMLMethod Now whenever a DTML Method is called you will get to view the path. Create a confusing set of folders and methods. View a method and Komodo will be called. Example: debugging DTML Image: KomodoDebugger.png Well you can't, but by putting a breakpoint in a DTML Method such as dtml-with you can see the effects of calling one. Be careful though since this dtml is called in the management screen and you will run straight into the debugger. You can see as self changes to the folders as dtml-with pops objects onto the stack. File: Zope Installation \lib\python\DocumentTemplate\DT_With.py Tested with: Windows 2000 ServerActivePerl 5.6 (build 620) ActivePython 2.0 (build 202) Komodo Beta 1.0 (build 13428), Beta 1.1 (build 14400) Zope 2.2.5, 2.3b2, 2.3 |