xdebug

Provides functions for function traces and profiling


The Xdebug extension helps you debugging your script by providing a lot of
valuable debug information. The debug information that Xdebug can provide
includes the following:

* stack and function traces in error messages with:
o full parameter display for user defined functions
o function name, file name and line indications
o support for member functions
* memory allocation
* protection for infinite recursions

Xdebug also provides:

* profiling information for PHP scripts
* code coverage analysis
* capabilities to debug your scripts interactively with a debug client

License: BSD style

Latest releases

Version Release Download
3.0.0 2020-11-25 xdebug-3.0.0.tgz
3.0.0RC1 2020-11-14 xdebug-3.0.0RC1.tgz
3.0.0beta1 2020-10-14 xdebug-3.0.0beta1.tgz
2.9.8 2020-09-28 xdebug-2.9.8.tgz
2.9.7 2020-09-16 xdebug-2.9.7.tgz
Show all releases

Changelog

Version Message
3.0.0 Wed, Nov 25, 2020 - xdebug 3.0.0

Xdebug 3 includes major changes in functionality compared to Xdebug 2. The
primary way how you turn on functionality is through the new xdebug.mode PHP
configuration setting. This made it possible to massively increase performance
in many of Xdebug's sub systems as Xdebug is now much more conservative in
which hooks are enabled.

Configuration changes, massive performance improvements, and PHP 8 support are
the primary features in Xdebug 3, but there is much more. The upgrade guide
lists the changes in great detail, please read it:

https://xdebug.org/docs/upgrade_guide

-------------

+ New features:

- Implemented issue #1762: Introduce feature modes
- Implemented issue #1793: Add xdebug.start_upon_error setting to cover the removed xdebug.remote_mode=jit feature.
- Implemented issue #1797: Implement generic logging
- Implemented issue #1801: Rename mode 'display' to mode 'develop'
- Implemented issue #1831: Add diagnostics function xdebug_info()
- Implemented issue #1833: Add links to documentation in diagnostic log
- Implemented issue #1837: Support for associative variadic variable names (PHP 8)
- Implemented issue #1841: Add support for PHP 8 'match' keyword

+ Improvements:

- Implemented issue #1680: Update var dumping routines to include relevant information for interned strings and immutable arrays
- Implemented issue #1712: Add unit to profiler data types
- Implemented issue #1743: Figuring out whether a call is a closure uses string comparisions instead of checking the ACC flag (Benjamin Eberlei)
- Implemented issue #1752: Use a stack pool to manage stack entries instead of allocating and deallocating entries
- Implemented issue #1755: Overload pcntl_fork() to prevent performance degradation by calling xdebug_get_pid often (Carlos Granados)
- Implemented issue #1781: Include 'Xdebug' in max nesting level error message
- Implemented issue #1783: Stacktrace needs vertical scrolling on small screens (Tobias Tom)
- Implemented issue #1789: Provide PHP stubs for Xdebug's functions
- Implemented issue #1807: Document Xdebug installation with yum and apt
- Implemented issue #1813: Make sure that the xdebug_init_*_globals don't do more than they need to, and that init is only done when xdebug.mode != off
- Implemented issue #1817: Switch filename storage from char*/size_t to zend_string*
- Implemented issue #1818: Switch variable storage from char*/size_t to zend_string*
- Implemented issue #1820: Increase time tracing precision (Michael Voříšek)
- Implemented issue #1824: Allow Xdebug's mode to be set through an environment variable
- Implemented issue #1825: Improve profiler performance by not calling fflush after every function (Michael Voříšek)
- Implemented issue #1826: Reduce profiler memory allocation and call overhead
- Implemented issue #1829: Switch to 10ns profiler resolution (Michael Voříšek)
- Implemented issue #1832: If connect back host can not be contacted, fallback to remote_host/port
- Implemented issue #1858: Only open/close log if there is an actual message to log
- Implemented issue #1860: Allow xdebug.cloud_id to be set through an environment variable
- Implemented issue #1814: Don't obtain the current time when it's not needed
- Implemented issue #1835: Add current trace and profile file name, to diagnostic page
- Implemented issue #1885: Change xdebug.start_with_ settings to PHP_INI_SYSTEM|PHP_INI_PERDIR
- Implemented issue #1889: max_nesting_level should only trigger in "develop" mode

- Removed features:

- Implemented issue #1795: Deprecate PHP 7.1 support

- Implemented issue #1786: Remove idekey value fallback to USER/USERNAME environment variable
- Implemented issue #1809: Remove "overload_var_dump" setting
- Implemented issue #1810: Remove collect_vars and xdebug_get_declared_vars()
- Implemented issue #1812: Remove show_mem_delta setting
- Implemented issue #1838: Remove collect_params setting, and always default it to "4"
- Implemented issue #1847: Remove xdebug.remote_cookie_expire_time setting
- Implemented issue #1016: Removed support for pause-execution (introduced in beta1)
- Implemented issue #1868: Remove xdebug_disable and xdebug_enabled
- Implemented issue #1883: Function xdebug_is_enabled has been removed

= Changes:

- Implemented issue #1378: Unfortunate coupling of default_enable=1 and remote_mode=jit
- Implemented issue #1773: Replace all xdebug.*_output_dir settings with xdebug.output_dir
- Implemented issue #1785: Replace xdebug.remote_mode and xdebug.auto_trace with generic "start-with-request" setting
- Implemented issue #1791: Replace xdebug.*trigger*, xdebug.*trigger_value*, with xdebug.start_with_request=trigger and xdebug.trigger_value
- Implemented issue #1792: Change start_with_request=always/never to start_with_request=yes/no
- Implemented issue #1794: Replace the filter's blacklist/whitelist with exclude/include
- Implemented issue #1811: Remove xdebug.collect_includes setting and always include them
- Implemented issue #1843: Adjust XDEBUG_CONFIG checks, and document what can be set through it
- Implemented issue #1844: Add deprecation warning for removed and renamed configuration setting names
- Implemented issue #1845: Rename xdebug.remote_{host,port} to xdebug.client_{host,port}
- Implemented issue #1846: Rename setting xdebug.remote_timeout to xdebug.connect_timeout_ms
- Implemented issue #1848: Change default Xdebug port from 9000 to 9003
- Implemented issue #1850: Change array variable output in tracing to use modern [] syntax
- Implemented issue #1856: Rename xdebug.remote_connect_back to xdebug.discover_client_host
- Implemented issue #1857: Rename xdebug.remote_addr_header to xdebug.client_discovery_header

= Fixed bugs:

- Fixed issue #1608: XDEBUG_CONFIG env var make sessions automatically START ever (at least send the XDEBUG_SESSION cookie)
- Fixed issue #1726: Memory leaks spotted in various places in typical error code paths
- Fixed issue #1757: Pause-execution feature degrades performance
- Fixed issue #1864: Incompatibility with PCS and protobuf extensions
- Fixed issue #1870: XDEBUG_SESSION_START URL parameter does not override XDEBUG_SESSION cookie
- Fixed issue #1871: The "idekey" is not set when debugging is started through XDEBUG_SESSION cookie
- Fixed issue #1873: xdebug_info() segfaults if the diagnostic buffer is empty
- Fixed issue #1874: Incompatibility with protobuf extension
- Fixed issue #1875: Overflow with large amounts of elements for variadics
- Fixed issue #1878: Compilation failure: Socket options TCP_KEEPCNT and TCP_KEEPINTVL do not exist on Solaris 10 Sparc
- Fixed issue #1880: Bundled unit test tests/debugger/bug00886.phar misses to load phar extension
- Fixed issue #1887: Crash bug with xdebug_call_class and xdebug_call_file
- Fixed issue #1756: Php process won't exit after running connected to a client
- Fixed issue #1823: Profiler generates negative data for memory usage
- Fixed issue #1834: Return type must be bool in overloaded set_time_limit
- Fixed issue #1888: Make headers sticky in xdebug_info() output

+ Documentation

- Fixed issue #1865: Document XDEBUG_TRIGGER environment variable
- Fixed issue #1866: Document comma separated xdebug.mode values
- Fixed issue #1884: Document where Xdebug's settings can be set
- Fixed issue #1892: Document changed/removed ini settings in the upgrade guide with the links provided
3.0.0RC1 Mon, Nov 16, 2020 - xdebug 3.0.0RC1

This is a BETA release, and not ready for production environments.

Xdebug 3 has many changes. Please read the upgrade guide at
https://3.xdebug.org/docs/upgrade_guide

Xdebug 3 documentation is available at https://3.xdebug.org/docs

-------------

+ Improvements:

- Implemented issue #1814: Don't obtain the current time when it's not needed
- Implemented issue #1885: Change xdebug.start_with_ settings to PHP_INI_SYSTEM|PHP_INI_PERDIR

- Removed features:

- Implemented issue #1016: Removed support for pause-execution (introduced in beta1)
- Implemented issue #1868: Remove xdebug_disable and xdebug_enabled
- Implemented issue #1883: Function xdebug_is_enabled has been removed

= Fixed bugs:

- Fixed issue #1608: XDEBUG_CONFIG env var make sessions automatically START ever (at least send the XDEBUG_SESSION cookie)
- Fixed issue #1757: Pause-execution feature degrades performance
- Fixed issue #1864: Incompatibility with PCS and protobuf extensions
- Fixed issue #1870: XDEBUG_SESSION_START URL parameter does not override XDEBUG_SESSION cookie
- Fixed issue #1871: The "idekey" is not set when debugging is started through XDEBUG_SESSION cookie
- Fixed issue #1873: xdebug_info() segfaults if the diagnostic buffer is empty
- Fixed issue #1874: Incompatibility with protobuf extension
- Fixed issue #1875: Overflow with large amounts of elements for variadics
- Fixed issue #1878: Compilation failure: Socket options TCP_KEEPCNT and TCP_KEEPINTVL do not exist on Solaris 10 Sparc
- Fixed issue #1880: Bundled unit test tests/debugger/bug00886.phar misses to load phar extension
- Fixed issue #1887: Crash bug with xdebug_call_class and xdebug_call_file

+ Documentation

- Fixed issue #1865: Document XDEBUG_TRIGGER environment variable
- Fixed issue #1866: Document comma separated xdebug.mode values
- Fixed issue #1884: Document where Xdebug's settings can be set
3.0.0beta1 Wed, Oct 14, 2020 - xdebug 3.0.0beta1

This is a BETA release, and not ready for production environments.

Xdebug 3 has many changes. Please read the upgrade guide at
https://3.xdebug.org/docs/upgrade_guide

Xdebug 3 documentation is available at https://3.xdebug.org/docs

-------------

+ New features:

- Implemented issue #1762: Introduce feature modes
- Implemented issue #1793: Add xdebug.start_upon_error setting to cover the removed xdebug.remote_mode=jit feature.
- Implemented issue #1797: Implement generic logging
- Implemented issue #1801: Rename mode 'display' to mode 'develop'
- Implemented issue #1831: Add diagnostics function xdebug_info()
- Implemented issue #1833: Add links to documentation in diagnostic log
- Implemented issue #1837: Support for associative variadic variable names (PHP 8)
- Implemented issue #1841: Add support for PHP 8 'match' keyword

- Removed features:

- Implemented issue #1795: Deprecate PHP 7.1 support

- Implemented issue #1786: Remove idekey value fallback to USER/USERNAME environment variable
- Implemented issue #1809: Remove "overload_var_dump" setting
- Implemented issue #1810: Remove collect_vars and xdebug_get_declared_vars()
- Implemented issue #1812: Remove show_mem_delta setting
- Implemented issue #1838: Remove collect_params setting, and always default it to "4"
- Implemented issue #1847: Remove xdebug.remote_cookie_expire_time setting

= Changes:

- Implemented issue #1378: Unfortunate coupling of default_enable=1 and remote_mode=jit
- Implemented issue #1773: Replace all xdebug.*_output_dir settings with xdebug.output_dir
- Implemented issue #1785: Replace xdebug.remote_mode and xdebug.auto_trace with generic "start-with-request" setting
- Implemented issue #1791: Replace xdebug.*trigger*, xdebug.*trigger_value*, with xdebug.start_with_request=trigger and xdebug.trigger_value
- Implemented issue #1792: Change start_with_request=always/never to start_with_request=yes/no
- Implemented issue #1794: Replace the filter's blacklist/whitelist with exclude/include
- Implemented issue #1811: Remove xdebug.collect_includes setting and always include them
- Implemented issue #1844: Add deprecation warning for removed and renamed configuration setting names
- Implemented issue #1845: Rename xdebug.remote_{host,port} to xdebug.client_{host,port}
- Implemented issue #1846: Rename setting xdebug.remote_timeout to xdebug.connect_timeout_ms
- Implemented issue #1848: Change default Xdebug port from 9000 to 9003
- Implemented issue #1850: Change array variable output in tracing to use modern [] syntax
- Implemented issue #1856: Rename xdebug.remote_connect_back to xdebug.discover_client_host
- Implemented issue #1857: Rename xdebug.remote_addr_header to xdebug.client_discovery_header

+ Improvements:

- Implemented issue #1016: Support for pause-execution (Robert Lu)
- Implemented issue #1680: Update var dumping routines to include relevant information for interned strings and immutable arrays
- Implemented issue #1712: Add unit to profiler data types
- Implemented issue #1743: Figuring out whether a call is a closure uses string comparisions instead of checking the ACC flag (Benjamin Eberlei)
- Implemented issue #1752: Use a stack pool to manage stack entries instead of allocating and deallocating entries
- Implemented issue #1755: Overload pcntl_fork() to prevent performance degradation by calling xdebug_get_pid often (Carlos Granados)
- Implemented issue #1781: Include 'Xdebug' in max nesting level error message
- Implemented issue #1783: Stacktrace needs vertical scrolling on small screens (Tobias Tom)
- Implemented issue #1789: Provide PHP stubs for Xdebug's functions
- Implemented issue #1807: Document Xdebug installation with yum and apt
- Implemented issue #1813: Make sure that the xdebug_init_*_globals don't do more than they need to, and that init is only done when xdebug.mode != off
- Implemented issue #1817: Switch filename storage from char*/size_t to zend_string*
- Implemented issue #1818: Switch variable storage from char*/size_t to zend_string*
- Implemented issue #1820: Increase time tracing precision (Michael Voříšek)
- Implemented issue #1824: Allow Xdebug's mode to be set through an environment variable
- Implemented issue #1825: Improve profiler performance by not calling fflush after every function (Michael Voříšek)
- Implemented issue #1826: Reduce profiler memory allocation and call overhead
- Implemented issue #1829: Switch to 10ns profiler resolution (Michael Voříšek)
- Implemented issue #1832: If connect back host can not be contacted, fallback to remote_host/port
- Implemented issue #1858: Only open/close log if there is an actual message to log
- Implemented issue #1860: Allow xdebug.cloud_id to be set through an environment variable

= Fixed bugs:

- Fixed issue #1756: Php process won't exit after running connected to a client
- Fixed issue #1823: Profiler generates negative data for memory usage
- Fixed issue #1834: Return type must be bool in overloaded set_time_limit
2.9.8 Mon, Sep 28, 2020 - xdebug 2.9.8

= Fixed bugs:

- Fixed issue #1851: Paths are not counted as coveraged with loops calling function
- Fixed issue #1855: Build issues on FreeBSD
2.9.7 Wed, Sep 16, 2020 - xdebug 2.9.7

= Fixed bugs:

- Fixed issue #1839: Add keepalive options to debugging socket
Show complete changelog