10大PHP开发调试工具

jopen 10年前

MacGDBp

If you are a Mac user this is surely one of the most recommended PHP debugging tools. It is a live PHP debugger application and features ability to step through your code and set breakpoints. This allows you to bring up an inspector HUD to view and you will be able to view entire contents of the variable. It is ideal for long strings such as templates, queries, or POST values.

DebugBar

It is an open source app which can easily integrate into your PHP project. This tool collects and presents profiling data. Its USP lies in the fact that it has no dependencies and supports Ajax requests. It is a complete JavaSctipt tool that is placed in the footer like deb tools and includes generic data collectors also supports all the popular libraries.

Firebug

Though usually used for HTML, CSS, JavaScript and Ajax it can also be used for PHP debugging. You can combine this extension with a server-side library and your PHP scripts and this will send debugging information to the browser. It generates log warnings and errors in your PHP scripts which you can attend to and rectify your application.

Whoops

This is one of the most used PHP libraries that are used for handling errors and debugging them easily. This library is well presented to you in stack-based error handling with well-organized error interface. You will come across an easy to use API that can easily deal with exceptions; it can trace frames and their data that can be easily integrated with any framework.

PHP Debugger

One of the most used PHP debugging tools it helps in spotting the bugs which can be fixed easily. It speeds us the process of finding bugs and eliminating them from your scripts and applications. Here you can setup remote debugging in PhpED using debug PHP Settings Wizard and DBG Wizard. It can easily inspect any variable or class in PHP and assigns different value to PHP variables in the script.

PHPMD

If you are looking for an easy to configure, user-friendly front-end tool to measure the raw data this is the perfect tool that we can suggest you. It will offer you a good glimpse into several potential problems in your code. These include possible bugs, sub-optimal code and unused parameters that can restrict the use of your application.

PHP_Dyn

It is an open source tool that offers you great output. It works as an extension where you can get execution trace of scripts without the need to change them. It also allows you to print the HTTP request parameter and also offers you information on the argument value of the function call and return value both of which can be printed.

Krumo

You might have used print_r() & var_dump() for debugging. The problem is the output can be hard to read especially in case of unformatted results. Krumo offers you the perfect answers to this problem as it displays structured information about any PHP variable. Once you have run this tool the output is displayed in a collapsible DHTML tree built and placed around the structure of the dumped PHP variable. What this does is speeds up the debugging process as you can turn it off rather than disabling as is the case with many other tools.

Pinba

This is an open source MySQL storage engine which also acts as a statistics server for PHP. It accumulates and processes data sent over UDP and uses multiple PHP processes for this. It displays statistics in a nice human-readable report. It also provides read-only interface to the raw data which facilitates generation of more sophisticated reports and stats.

Kint

You might have already used var_dump(), print_r() and debug_backtrace() in debugging. This zero set up open source tool will ease your debugging experience. It helps in easily identifying the type of data being dumped and will suggest you tailored alternatives that will make your script and application better. It makes the job easy as it presents to you the name of the variable, file, its line and the function.