7.5

Table Of Contents
Feature: Description:
erences completion feature and the argument list display feature provide quick references for specific commands.
Debugging Features
What debugging features are available in the PlanetPress Talk Editor?
The Editor provides four key features that can help you debug problem programs: execution control, breakpoints, spies, and
expression evaluation. They are not available when you launch the Editor from the PlanetPress Talk properties of a document
or condition, when you are editing the PlanetPress Talk before/after paragraph properties of a text object, or when you are
creating or editing a global function.
1. Execution control
The different execution methods, in particular the Run to cursor and the Step by step methods of executing a program,
can be useful when you are debugging a program. You can exit program execution at any point.
2. Breakpoints
A breakpoint stops the execution of the program at a specific line in the code. You can set the breakpoint to take effect
whenever the program arrives at that line, or only when the program arrives at that line and a specified condition is
True. You can set as many breakpoints as you need.
3. Spies
A spy is a PlanetPress Talk expression that references one or more variables or expressions in your PlanetPress Talk
code and evaluates to a string, integer, measure, currency or Boolean value. The expression you use for the spy may
or may not be part of the existing code.
Spies are useful for monitoring variables or expressions in your PlanetPress Talk code. The spies you create appear in
the Spy list. When you execute the program, they update to reflect the changing values of the variables they reference.
Spies can reference global, system, and local variables. Note, however, that the only local variables you can reference
when you create a spy are those defined in the program loaded in the Editor at that time.
There is one Spy list per individual object or page.
4. Expression evaluation
You can evaluate any PlanetPress Talk expression that evaluates to a string, integer, measure, currency or Boolean
value, whether or not that expression appears in the Code area of the Editor.
The value of any variable the expression references is its value at the point in program execution at which you perform
the evaluation. You can reference system variables, global variables, as well as any local variables that appear in the
program currently loaded in the Editor.
Other Features Useful in a Debugging Context
In addition to the four key debugging features, comments, debugging code, and the Object Preview can also be useful during
debugging.
Comments can be very handy for enabling or disabling sections of code.
Debugging code is code you embed in the program for debugging purposes only; during execution, it prints information that
helps you debug the program. The Messages area of the Object Preview displays the debugging code. Once you solve the
problem, you remove the debugging code.
The Object Preview is useful both for viewing the result of code execution up to the current stop point in the code, and for
examining error messages and debugging strings.
Code Execution in the Editor
When are the execution and debugging features of the Editor available? When I execute a program in the Editor, what other
code executes along with it?
©2010 Objectif Lune Inc - 203 -