Xdebug in Xampp

Asked

Viewed 2,715 times

3

I’m having trouble activating Xdebug in xampp, since I can’t find the directives in xampp to configure Xdebug.

How do I add the Xdebug extension in xampp php.ini?

  • 1

    Possible duplicate of How to debug code in PHP? ( @rray’s response seems to solve the problem well)

  • Debugging is cool, the case is to install Xdebug in xampp, because in the new version of xampp I could not and did not find any configuration of Xdebug in php.ini

  • Usually php.ini doesn’t come with Xdebug configured, you added those lines of the answer? the Xdebug dll path looks like?

  • 1

    Which OS you use?

  • I added yes, using windows 7, the configurations looked like this: zend_extension = "C:xampp php ext php_xdebug.dll" and then those default port and host configurations, but still could not, if I look at the configurations by phpinfo() shows that Xdebug is disabled

  • The truth is that I used an old version of xampp in which Xdebug was already configured and worked. The bad thing is to use an old version of xampp

  • In my php.ini only the dll is indicated, so zend_extension = "php_xdebug.dll". Her path is c:\xampp\php\ext. tkmattos don’t forget to put the arroba before the user name to notify you :)

  • ok @rray , thanks for the valuable help as usual

Show 4 more comments

2 answers

3

The standard path of php.ini of xampp is this:

C:\xampp\php\php.ini

Just access and edit it.

  • The location of php.ini is quiet, the doubt is how to add the extension by php.ini, because in the most current xampp I did not find the settings, and even adding the dll of Xdebug I could not make it work

2

add the following section in your php.ini

[XDebug]
zend_extension_ts = "./php/ext/php_xdebug<version>.dll"
xdebug.remote_enable=1
xdebug.remote_autostart = 1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir="<XAMPP_HOME>\tmp"

Source: https://netbeans.org/kb/docs/php/configure-php-environment-windows.html

  • 3

    Since PHP 5.3, you Always need to use the 'zend_extension', and NOT 'zend_extension_ts', 'zend_extension_debug' or 'Extension'.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.