2

我的本地网络上有一个远程服务器。我在那里设置了 PHPStorm 和 XDebug,并.ini为我的 xdebug 设置了以下设置:

xdebug.remote_enable=On
xdebug.remote_connect_back=On
xdebug.remote_autostart=On
xdebug.remote_port=9022

xdebug.profiler_enable=1
xdebug.profiler_output_dir=/tmp/xdbgsnapshots
xdebug.profiler_enable_trigger=1

运行 XDebug 的网络服务器在端口 88 上运行,所以当我连接到调试时,我执行以下操作:

  1. 在我的代码中的某处设置断点
  2. 打开Listen to incoming PHP Debug connections
  3. 通过 88 端口连接到网络服务器
  4. 根据需要调试

我原以为这种设置也足以进行分析,但我无法使其工作(即没有任何内容保存到目录中)。我在这里使用书签触发器来尝试触发分析开始和结束,但它似乎没有做任何事情(可能是因为 xdebug 没有在我的机器上运行,而是在远程服务器上运行)。

鉴于上述配置,我如何设置分析?不幸的是,对本地代码库运行它不是一种选择。

4

1 回答 1

0

为了使触发器正常工作,需要将 xdebug.profiler_enable 设置为 0。

xdebug.profiler_enable=0

参考:https ://xdebug.org/docs/profiler

于 2017-03-28T14:32:38.600 回答