Instaling Xdebug (PHP5 Debian)

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

    1
    <span class="text">xdebug.ini</span>

    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 le viagra en belgique.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

    1
    <span class="text">/usr/lib/php5/20060613+lfs/</span>

    with your extensions dir and

    1
    <span class="text">192.168.1.1</span>

    with your host IP address.

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

Author: Rafał Żelazko

Freelancer. Experienced J2EE, PHP, JS Developer. Advanced Linux user. WebPerfekt.pl owner.

2 thoughts on “Instaling Xdebug (PHP5 Debian)”

  1. I have had it working on 5.3, can’t reemebmr having problems. Chances are you don’t have the right dependencies installed. Also, make sure you can compile *without* clearsilver first to make sure php can compile successfully also.Sorry this reply is late! Been busy.

Leave a Reply

Your email address will not be published. Required fields are marked *