Enable Xdebug on XAMPP for Windows

Jul 24, 2014
[XAMPP](https://www.apachefriends.org/index.html) is a free and open source cross-platform web server stack that offers [Apache](https://httpd.apache.org/) (Web Server), [MySQL](https://mysql.com/) (Relational Database) and interpreters for [PHP](https://php.net/) and [Perl](http://perl.org/) programming languages. XAMPP is one of the most feature rich Web Server stack solution.

XAMPP is great for developing a website or web application locally. XAMPP by default is set in PHP development mode, which means you don’t have to configure it if you are using it for development purpose. You have the complete freedom right from the installation process to customize and tailor XAMPP to your preference.

XDebug is a PHP extension which provides debugging and profiling capabilities. It uses the DBGp debugging protocol. The debug information that XDebug can provide includes the following:

  • stack and function traces in error messages with:
    • full parameter display for user defined functions
    • function name, file name and line indications
    • support for member functions
  • memory allocation
  • protection for infinite recursions
  • profiling information for PHP scripts
  • code coverages analysis
  • capabilities to debug your scripts interactively with a debugger front-end

Setting up XDebug.

Open your XAMPP panel and click the Config button, a menu will appear.

Click the fourth option in the menu that says <code class="highlighter-rouge">PHP (php.ini).

This should open the ‘php.ini’ file in notepad or your default text editor.

Now add the following code block at the end of your <code class="highlighter-rouge">php.ini file.

“` [XDebug] xdebug.remote_enable = on xdebug.remote_host=”″ xdebug.remote_port=9000 xdebug.remote_handler=dbgp xdebug.profiler_output_dir=”\xampp\tmp” [PHP_XDEBUG] zend_extension=”C:\XAMPP\php\ext\php_xdebug.dll” “`
Now you can restart Apache, After Apache restarts you will see Xdebug in action.

Enjoy. Happy Coding!

If you like this content, please consider buying me a coffee.

Buy me a coffeeBuy me a coffee

You will get access to contributer exclusive resources and content.

Thank you!

Darryl Dias

I am a student, artist, and author currently living in Florida. My interests range from technology to arts. I am also interested in programming, writing

Analytics by GoSquared