gpt4 book ai didi

command-line-interface - XDebug:如何调试远程控制台应用程序?

转载 作者:行者123 更新时间:2023-12-03 15:11:54 25 4
gpt4 key购买 nike

我已阅读此文档:http://xdebug.org/docs/remote

我可以调试我的网络应用程序。
但是调试器不会为控制台命令启动。

我的 XDebug 的 .ini 文件(有效):

$ cat /etc/php5/fpm/conf.d/xdebug.ini
zend_extension=/usr/lib/php5/20090626/xdebug.so
xdebug.idekey="PHPSTORM"
xdebug.remote_connect_back=1
xdebug.remote_enable=1
cli 的 .ini 文件是一样的。

我也尝试添加 export XDEBUG_CONFIG="idekey=PHPSTORM remote_enable=1 remote_connect_back=1"在调试之前,但它没有帮助。

我怎样才能启用它?

最佳答案

简短的回答:

我们需要设置2个环境变量,这些两个线路:

export PHP_IDE_CONFIG="serverName={SERVER NAME IN PHP STORM}"
export XDEBUG_CONFIG="remote_host=$(echo $SSH_CLIENT | awk '{print $1}') idekey=PHPSTORM"

更新:
好的 IDE(例如 PhpStorm)会为您完成,只需将 PHP 解释器设置为远程解释器即可。

关于command-line-interface - XDebug:如何调试远程控制台应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16518262/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com