Phonebot developer's reference/Advanced tools
Phonebot Plus introduces several tools to simplify development and to help create more manageable applications. Applications created in Phonebot Plus will run in Phonebot, but some features can only be edited in Phonebot Plus.
Applications and modules can be executed using the Run menu to call Run, Debug, and "Step into". Run executes the application normally. Debug and "Step into" execute the application in debug mode. Debug mode displays a debug bar with debug buttons, status, and a script viewer.
The debug buttons allow you to stop the application, pause on the next line, step over the current line, and execute the code. The status displays the current object and event, and the debug state. The script viewer displays the current script with the active line highlighted.
The Script Browser in Phonebot is used to track scoped variable references and delete any unreferenced variables from an application. The advanced browser adds access to all scripts within an application and management of user-defined methods (see below).
The Script Browser lists the application object and every module object. Within each object line item are sections labeled Variables and Scripts. From here, scripts within every event and method can be edited without having to navigate to the specific object's properties.
User-defined methods are blocks of script not tied to any object event. Like scoped variables, user-defined methods can be attached to the application object or a module object. User-defined methods are useful for scripts that may be called in multiple instances. For example, an application could load a list within module.on_open or within a button.on_click when a refresh is required. The same code could be contained in a user-defined method.