kali激活phpstorm_kali+phpstorm+xdebug+firefox配置本地/远程调试

本文介绍了如何在kali系统中安装和配置xdebug,包括下载xdebug、安装预装件、编译安装、更新php.ini以及重启web服务器。此外,还详细说明了如何在phpstorm中配置本地和远程调试环境,涉及到xdebug的配置参数以及idekey设置。
摘要由CSDN通过智能技术生成

本地调试:

本地环境:kali(192.168.12.35)+phpstorm2019.1.3+xdebug+firefox

1)安装配置xdebug:

根据phpinfo下载xdebug

1. Download xdebug-2.9.2.tgz

2. Install the pre-requisites for compiling PHP extensions. On your Debian system, install them with: apt-get install php-dev autoconf automake

3. Unpack the downloaded file with tar -xvzf xdebug-2.9.2.tgz

4. Run: cd xdebug-2.9.2

5. Run: phpize (See the FAQ if you don’t have phpize).

As part of its output it should show:

Configuring for:

Zend Module Api No: xxxxxxxx

Zend Extension Api No: xxxxxxxxx

If it does not, you are using the wrong phpize. Please follow this FAQ entry and skip the next step.

11.Run: ./configure

12.Run: make

13.Run: cp modules/xdebug.so /usr/lib/php/xxxxxxxx

14.Update /etc/php/7.x/apache2/php.ini and change the line

zend_extension = /usr/lib/php/xxxxxxxx/xdebug.so

Make sure that zend_extension = /usr/lib/php/xxxxxxxx/xdebug.so is below the line for OPcache.

15.Restart the webserver

php.ini:

末尾

[XDebug]

zend_extension = /usr/lib/php/xxxxxxxx/xdebug.so

; Debug Config

xdebug.remote_enable = 1

xdebug.remote_handler = "dbgp"

xxdebug.remote_mode = "req"

xdebug.remote_host = "127.0.0.1"

xdebug.remote_port = 9010

xdebug.remote_log = "/var/log/php-fpm/xdebug.log"

xdebug.remote_autostart = off

xdebug.idekey = "PHPSTORM"

; Profiler Config

xdebug.profiler_append = 0

xdebug.profiler_enable = 1

xdebug.profiler_output_dir = "/tmp/xdebug"

xdebug.trace_output_dir = "/tmp/xdebug"

xdebug.profiler_enable_trigger = 0

xdebug.profiler_output_name = "cache.out.%t-%s"

2)配置phpstorm

d573ca9a7db61d6c69490527cd59c3c9.png

56e73b2594ca52eb2fd9c4530434348e.png

5cd13a8c19d251acb2e93a6738711e8c.png 

47a8e7758c9127822b57b389d3e17836.png

f63a4ee73c040ced64934ca568acfe51.png

e67157f7118c915d84a64a3b1b9a8070.png  

beafb33179439298ab2e8eeda8ee477b.png

09b74941e1640ff9244f03ede5b63ea9.png

2565f8554de89c5c61682093376067e2.png

远程调试

远程环境:win7(192.168.12.34)+phpstudy2016(php5.4.45+apache:8866)+xdebug

本地环境:kali(192.168.12.35)+phpstorm2019.1.3+xdebug+firefox

1)安装配置远程xdebug

phpstudy直接可直接开启php扩展xdebug

[XDebug]

xdebug.profiler_output_dir="D:\phpStudy\tmp\xdebug"

xdebug.trace_output_dir="D:\phpStudy\tmp\xdebug"

zend_extension="D:\phpStudy\php\php-5.4.45\ext\php_xdebug.dll"

xdebug.profiler_append = 0

xdebug.profiler_enable = 1

xdebug.profiler_enable_trigger = 0

xdebug.profiler_output_name = "cache.out.%t-%s"

xdebug.remote_enable = 1

xdebug.remote_handler = "dbgp"

xdebug.remote_mode = "req"

xdebug.remote_host = "192.168.12.35"

xdebug.remote_port = 9001

xdebug.idekey= PHPSTORM

2)配置phpstorm

/*

配置ftp部署同步

328b00f44ca6b1347c6ea7026e57d40a.png

9a4a6379f98e0f438f7ab643820fb26b.png

79e9aa008daa92b2eaafc26687713c8c.png

464e99ba17a3beabef421a78ae9c5347.png

880d137e7a6ff7b9e244694ac19143c0.png

*/

a5e1325079df77ccbaae5767121cc002.png

f6f13a44ffbd53f31220700c067afe2a.png

2db20ab71c856cf7495ea5da809a4c42.png

4e597929cd429e7f2e7f166ea3254eca.png

8bed7e07c514db088ba589472a3b4519.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值