Dec
19

Instaling Xdebug (PHP5 Debian)

By rzelazko  //  Apache, Lamp, Linux, Pecl, PHP  //  1 Comment

To install Xdebug (as PECL extension) on Debian Linux you should take the following steps:

  1. Get and compile Xdebug:
    aptitude install apache2-dev php5-dev php-pear make
    pecl install xdebug-beta
  2. Create ini file to enable Xdebug:
    vi /etc/php5/conf.d/xdebug.ini

    Type in xdebug.ini file:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    ; uncomment the next line to enable the module
    zend_extension=/usr/lib/php5/20060613+lfs/xdebug.so

    [debug]
    ; Remote settings
    xdebug.remote_autostart=off
    xdebug.remote_enable=on
    xdebug.remote_handler=dbgp
    xdebug.remote_mode=req
    xdebug.remote_host=192.168.1.1
    xdebug.remote_port=9000

    ; General
    xdebug.auto_trace=off
    xdebug.collect_includes=on
    xdebug.collect_params=off
    xdebug.collect_return=off
    xdebug.default_enable=on
    xdebug.extended_info=1
    xdebug.manual_url=http://www.php.net
    xdebug.show_local_vars=0
    xdebug.show_mem_delta=0
    xdebug.max_nesting_level=100
    ;xdebug.idekey=

    ; Trace options
    xdebug.trace_format=0
    xdebug.trace_output_dir=/tmp
    xdebug.trace_options=0
    ;xdebug.trace_output_name=crc32

    ; Profiling
    xdebug.profiler_append=0
    xdebug.profiler_enable=0
    xdebug.profiler_enable_trigger=0
    xdebug.profiler_output_dir=/tmp
    ;xdebug.profiler_output_name=crc32

    Warning! You must replace /usr/lib/php5/20060613+lfs/ with your extensions dir and 192.168.1.1 with your host IP address.

  3. Restart Apache:
    invoke-rc.d apache2 restart
  4. Use it!
    http://devzone.zend.com/article/2803-Introducing-xdebug

1 Comment to “Instaling Xdebug (PHP5 Debian)”

  • Very good read, some valid points were made. (This isn’t some stupid spam reply either, I’m a real follower.

Leave a comment