安装PHP调试库PHP DBG (文章纯属引用)

 
  

Server part

Compiling for Linux/Unix:

  1. install PHP (4.0.6 or higher). Follow instructions shipped with PHP.
  2. make sure phpize script is created.
  3. download DBG sources, unpack them for example in /usr/local/src directory.
  4. make sure you have autoconf 2.13 or newer, automake 1.4 or newer and libtool 1.3.3 or newer
  5. run deferphpize script. This script assumes that phpize is located in /usr/local/bin/phpize. If it isn't, please set $phpize environment variable with proper path.
  6. dbg.so library will be created in modules subdirectory.

from this point onwards, installation is similar to the installation of any official PHP extension. Proceed with "Configuring server part" topic

Compiling for Win32:

  1. download the latest PHP sources (4.0.6 or higher) and unpack them.
  2. download the latestDBG package, and install it.
  3. Copy dbg directory to the ext subdirectory of the PHP directory tree.
  4. Run Visual C++ open php4ts workspace and add the project named dbg.dsp to it.
  5. Select one of Debug_TS, Release_TS or Release_TS_Inline active configuration and compile it.

Using precompiled version for Win32:

  • download DBG archive, and unpack it.
    There are some versions of php_dbg.dll-x.x.x where x.x.x is a php version the dll is compatible with.

    from this point onwards, installation is similar to the installation of any official PHP extension. Proceed with "Configuring server part" topic

Configuring server part:

  1. copy php_dbg.dll (win32) or dbg.so (linux) into appropriate directory. Read PHP documentation on how to install PHP extension.
  2. add extension=php_dbg.dll (win32) or extension=dbg.so (linux) entry into php.ini file.
  3. enable debugger: find and edit (or add new) following entries in the php.ini file:
    [debugger]
    debugger.enabled = true
    debugger.profiler_enabled = true
    debugger.JIT_host = clienthost
    debugger.JIT_port = 7869
    note that clienthost is a keyword for DBG. If you use it, DBG will automatically detect IP of each client.
  4. run <? phpinfo(); ?> script just to make sure dbg extension is working properly. You will see following message in the header:
    with DBG v2.11.30, (C) 2000,2004 by Dmitri Dmitrienko, http://dd.cron.ru
    and appropriately formed dbg section.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值