JetBrains PhpStorm is a commercial IDE for PHP built on JetBrains' IntelliJ IDEA platform.
Edit php.ini, located at /xampp/php/php.ini if you use XAMPP
Turn the following properties
implicit_flush = On
; Type: boolean, Default value: 0
; This switch controls whether Xdebug should try to contact a debug client which is listening on the
; host and port as set with the settings xdebug.remote_host and xdebug.remote_port. If a connection
; can not be established the script will just continue as if this setting was Off.
xdebug.remote_enable = 1
; Type: string, Default value: dbgp
; Can be either 'php3' which selects the old PHP 3 style debugger output, 'gdb' which enables the GDB
; like debugger interface or 'dbgp' - the brand new debugger protocol. The DBGp protocol is more
; widely supported by clients. See more information in the introduction for Remote Debugging.
xdebug.remote_handler = "dbgp"
; Type: string, Default value: localhost
; Selects the host where the debug client is running, you can either use a host name or an IP
xdebug.remote_host = "localhost"
; Type: integer, Default value: 9000
; The port to which Xdebug tries to connect on the remote host. Port 9000 is the default for both the
; client and the bundled debugclient. As many clients use this port number, it is best to leave this
; setting unchanged.
xdebug.remote_port = 9000
Restart Apache by using XAMPP control panel. Xdebug should now be correctly configured, You can check this installation by using the online installation check page here
Start PhpStorm and under settings, add a new server if it is not already done
Then check that you use the default port for Xdebug
You should now be read to debug your PHP scripts, start the zero configuration feature of PhpStorm by clicking the phone to make it green. PhpStorm is now listening to incoming debug connections.
Add now add as many breakpoint in your code as required.
Visit this page: bookmarklets generator , you’ll have to save these bookmark to start/stop a debugging session by controlling the Xdebug cookie.
Now every time you want to debug a page, all you have to do is to use one of these bookmarks!
Enjoy debugging sessions with ease!
You might like also
Came across this excellent collection of resources (https://github.com/marcelgsantos/learning-oop-in-php) to learn object-oriented programming and related concepts for PHP developers. A lot of tutorials on OOP Fundamentals, OOP Advanced, Object Oriented Design, Design Patterns, Refactoring, Architecture, and more. …
1730 Days ago
Ubuntu 10.10 (Maverick) is offering as for today a relative old version PHP 5.3.3, if you want to have a better version, you’ll have to trust an unofficial APT repository. Here is How Thanks to the NGINX team, you can find nearly the latest version of PHP online at https://launchpad.net/~nginx/+archive/php5 Create a new file php5-ppa.list vi /etc/apt/sources.list.d/php5-ppa.list and depending on the version of your ubuntu, you can replace the word maverick with the oldest oneiric, natty, or the latest lucid …
3201 Days ago
Impact of Zend Optimizer on PHP PerformanceThe Zend Optimizer FAQ answers the question "Why use the Zend Optimizer?" with this statement: "The standard Zend run-time compiler used by PHP is indeed extremely fast, generating code that is usually 2 to 10 times faster. But an application that uses the Zend Optimizer typically executes another 40% to 100% faster."Read the results of the load test HERE. …
4379 Days ago
If you consider using PHP on a new server, use nothing else than PHP 5.2.3, it may be a pain to rewrite or patch foreign code, but PHP 5.2 is more secure and 100% faster than PHP4, moreover PHP4 is soon dead! PHP 4 end of life announcement "Today it is exactly three years ago since PHP 5 has been released. In those three years it has seen many improvements over PHP 4. PHP 5 is fast, stable & production-ready …
4599 Days ago
The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. It was conceived of to provide a free, open, and robust framework for caching and optimizing PHP intermediate code. from http://nl2.php.net/apc Links:http://nl2.php.net/apc http://pecl.php.net/package/APCJoomla! performance testing "For shared hosts you can best make use of APC or eAccelerator" …
4601 Days ago