Alex R
Alex R

Reputation: 11881

How to configure PHP XDebug with Eclipse on XAMPP v3.2.1 for Windows?

XDebug is not enabled by default in XAMPP on Windows, and all attempts to install a debugger lead to dead trails.

pecl install xdebug does not work on windows, and errors out with ERROR: The DSP xdebug.dsp does not exist.

The only download of Zend Debugger is a cygwin build, not XAMPP compatible.

Upvotes: 1

Views: 2740

Answers (1)

Alex R
Alex R

Reputation: 11881

The DLL php_xdebug.dll already comes bundled with XAMPP but for some silly reason the config is commented out by default.

Uncomment the lines near the end of php.ini, set remote_enable=1 and restart Apache:

[XDebug]
zend_extension = "C:\usr\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\usr\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "C:\usr\xampp\tmp"

Upvotes: 4

Related Questions