是否可以使用xdebug调试exec()和system()调用?

时间:2016-06-08 18:25:46

标签: php xdebug

我正在处理一个遗留应用程序,它使非常大量使用system()exec()来运行php脚本。执行system()调用后,Xdebug会话变量/标题似乎不会跟随。

是否有可能以某种方式迫使PHP 总是识别下游连接?

例如,index.php包含一行:

exec('php some_script.php')

如果我从浏览器/ cli运行index.php,我可以在some_script.php中放置一个断点并让断点注册到调试器吗?

这是我的xdebug.ini:

xdebug.remote_enable=1
xdebug.remote_host=10.0.2.2
xdebug.remote_port=9000
xdebug.connect_back = 1
xdebug.idekey = PHPSTORM
xdebug.remote_handler = dbgp
xdebug.remote_autostart = 1
xdebug.remote_connect_back = 1
xdebug.remote_log = /var/log/xdebug.log

0 个答案:

没有答案
相关问题