Instruction
Description how to use ZPTDebugger
Console tab
Tabular view with all executed Python expressions. List of expressions can be presented as a tree-like structure if flag Show result as tree structure is set. You can expand or collapse nodes and each level has bigger indentation. On root level there are all expressions used in debugged template. If there is a macro, slot or loop it becomes a node and all expressions inside become its children with bigger intentation. And of course its recursive.
- Template path - Input with relative path to template. If template url is: http://localhost:8080/folder/template enter only /folder/template
- Parameters - Input with template parameters. Enter them as keywords and separate with semicolons for example: id=2;path=/folder; user = john;. This will be transformed into REQUEST which is passed to template.
- Run - Button that calls the debugger and clear all previous entries.
- Clear - Remove all debugger data.
- Expand all/Collapse all - Button that shows or hides all debugger entries which are deeper than root level.
Record Mode
When this mode is on (just click Record button) then all expressions called anywhere within Zope will be recorded. It is useful when Template path and Parameters are not the only ones that influence template generation. Often there is a need to test a template inside real environment, for example: logged in user, session variable etc.
How to use it? Go to your Plone/Zope/other framework application and prepare to render your template by opening a page. In separate browser window or tab open Debugger Console and press Record. You will see message that Record mode is ON. Go back to template and render it either by using Test tab in ZMI or by refreshing page. After that refresh Console tab in ZPTDebugger and you will see all used expressions. For safety press Stop to turn off record mode.
In record mode page will be displaying warning: Every Python expression called within Zope will be recorded. This can cause severe decrease of performance. Use only for testing! That means that if you open few pages all Python and TAL expressions used inside will be added to debugger container. They are not grouped like for example in PTProfiler. So the result will be unreadable because it will be hard to distinguish where interesting template starts or ends. Also the page with results will be huge. Imagine that one Plone page executes about 1500 expressions.
Properties tab
- Value field length - How many characters can be presented in Value column. After that whole value can be seen using more link.
- Text in link showing value details - If you don't like caption more change it on something else.
- Show result as tree structure - Set this field to present debugger results as a tree which nodes can be expanded and collapsed. Unfortunatelly algorithm that process result to make tree structure cannot handle complicated templates like Plone ones. But for this flat list is fine.
Top downloads
| My CV | 1030 |
| ZPTDebugger-1.1.2.tar.gz | 578 |
| ZProtx-1.0.tar.gz | 335 |
|
|
264 |