blank

*intro

*contact

What Bugfoo is

Bugfoo is a commercial debugging and script analysis utility for PHP which is currently in alpha testing. It has one of the largest sets of features for obtaining information about your script – which is helpful for debugging, optimizing, and improving scripts in general. Many of its most useful features are unique to Bugfoo and aren't available, as far as we know, in other debugging, script profiling, and IDE-type applications. Its GUI is very easy to use, with many contextual help features to make your debugging and script analysis tasks as simple and intuitive as possible. Bugfoo will likely be useful to you even if you are a relative newbie, or have never been comfortable with other PHP debuggers. It also has some integration features allowing it to work together with the Xdebug debugger, making some of this debugger's features more accessible. We hope Bugfoo will help many with debugging tasks, and for some, provide an introduction to the notion of PHP debugging in general, and a stepping-stone to more advanced scripting and debugging tasks involving use of Bugfoo together with a classical PHP debugger.

Bugfoo is not an IDE

Bugfoo is purely about getting information out of your script, and presenting that information that makes sense for improving your script. It is not an editor, nor does it have any editing features. But it has many features for analyzing scripts which IDEs do not, and for many tasks it is likely to be easier to use than some IDEs. But it is not a "replacement" for a good IDE.

Bugfoo is not a classical PHP debugger

Bugfoo does not debug like most "standard" debuggers. It provides many different kinds of information relevant to debugging and improving your scripts which are not available in more standard-type debuggers, and makes it extremely for you to automate your own debugging by writing your own debugging functions with a simple API.

If you write or modify PHP scripts which are not trivially simple, you will want to make use of both Bugfoo and a classical PHP debugger (preferably in combination with an IDE or other graphical interface), depending on the type of information you want. Classical PHP debuggers have stepping functionality, which Bugfoo does not, and are also helpful when you need to view the changes in the stack, or the value of a variable, over a multitude iterations or breakpoints. They are also good for finding bottlenecks (slowness or inefficiency) in the total execution of a script. Bugfoo also allows you to see stack information and changes in the values of a variable, but doesn't let you step through code, and it displays all the information it produces about these on one page of its info console, and not point-by-point. For some debugging tasks, this is easier to view, since it allows for easier comparison between different results; but when there are a great many iterations or breakpoints to be reviewed, a classical PHP debugger will be more appropriate. Bugfoo also offers a wide range of other features for gathering information relevant to script execution which are not available in other debuggers.

Features

Search

Bugfoo lets you actively locate and identify problems in your script and parts of your script which you want to modify with its extensive search features. You can find what you are looking for in variables (local and global, multi-dimensional arrays and objects included), files which are relevant for the current request (included files or accessed files), constants, and even code coverage (only the lines of code which were actually executed during the page request). This means saving time in doing script-wide searching of files – and when it comes to things you need to locate which are located in variables, may be the only way of determining a particular location in a script.

Search results are also directly linked to the source files in the code browser, allowing you to add insertion points (Bugfoo's equivalent of breakpoints, with extra functionality) with just a click or two, for further analysis of your script at that point.

History

You can also save the information produced about your script and scripts output automatically, on a page-per-page basis with its history features for later consultation and comparison. This makes debugging and analyzing Ajax scripts very easy, and comes in handy for scripts which produce non-standard types of output, like images or xml.

Database

Bugfoo's database features can show you how many queries a script executes, and help you locate inefficient queries. Combining Bugfoo's search features with its database features allows you to evaluate queries separately for index efficiency, and with its phpmyadmin integration (upcoming: phpPgadmin integration, and later other database integration features), you can see the results of each query with a single click.

Benchmark

Its benchmarking features allow you to see the script execution time, memory usage, and other relevant information for a page's total execution, or at any place in the code during execution.

Other typical debugging features

Bugfoo also allows you to execute some classical debugging tasks like watching (dumping) variables, and showing stacktraces in code execution. However, if you need stepping functionality, or need to see variable watches and stacktraces at every line of code execution, or at more points than you care to see displayed on a single page, you should also use a classical PHP debugger. Both types of applications (Bugfoo and classical PHP debuggers) have their merits and types of tasks where they are most useful.

Much more ...

A vast array of other features is available for more advanced users, such as for detecting changes in the php ini settings made by a script, finding variables which are resources (file handlers, database links or result handlers, image handlers), determining which files have been accessed or modified by the script, and turning on or off settings like register globals or magic quotes gpc with just one click. Though there are numerous features, accessing the features is kept simple with a toolbar system, with separate toolbars for different aspects of script analysis – toolbars for benchmarking, mysql, files, output, xdebug, history, and other toolbars, keeping the many features within easy reach, but not cluttering up your viewing space.

Your own specialized debugging functions

You can easily integrate your own debugging code into functions which are called automatically at error points, at any point you like in script execution, or at the beginning and end of script execution. A very simple API allows you to add your own custom functions to the Bugfoo toolbars so you can turn them on and off for any of these functional modes (error, report points, or total execution) with a single click. You can even create entire toolbars with your own suite of debugging operations very easily if you have to debug an application with specific debugging needs.

Integration

Bugfoo also offers integration features for popular open source applications like Phpdocumentor, PHPXref, Phpmyadmin, and Xdebug (coming soon: phpPgadmin).

photo credit: USDA ARS
 
blank
© 2005