【发布时间】:2019-05-26 14:35:54
【问题描述】:
我正在尝试配置 xdebug 调试器,以便使用 netbeans 调试通过 Web 浏览器启动的脚本
场景
mypc localhost
linux ubuntu16.04
apache2.4
php7.2
netbeans8.2 IDE
both script.php and IDE in mypc
xdebug 配置
$ sudo nano /etc/php/7.2/mods-available/xdebug.ini
zend_extension=xdebug.so
;debugger_clients (remote)
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
;xdebug.remote_host=localhost
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_connect_back=On
$ sudo nano /etc/php/7.2/apache2/php.ini
output_buffering=Off
$ sudo netstat -ltnp | grep :9000
空输出
netbeansIDE,工具 > 选项 > PHP > 调试 >
SessionID:netbeans-xdebug
调试器端口:9000
然后我创建了一个netbeans项目并进行了配置
如果我尝试从 netbeans 以调试模式执行脚本(单击调试>) 调试模式有效!!!
如果我尝试从 Web 浏览器以调试模式执行脚本,则调试模式不起作用!!!
http://localhost/path/to/script/index.php?XDEBUG_SESSION_START=netbeans-xdebug
脚本执行不中断!!!
我也尝试安装了 Firefox 扩展“Xdebug Helper for Firefox”,但没有成功
【问题讨论】:
-
这不是 WP 问题,属于 stackoverflow