- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
当我尝试运行 xdebug 分析(从命令行)时,脚本立即终止。我没有收到任何反馈。 (如果我在关闭 xdebug 分析的情况下运行脚本,那么脚本的执行完全符合我的预期。)我在 Centos 6 中运行 php 5.4.13。
我尝试了两种不同的方式来启用分析:编辑 php.ini,以及在执行脚本时使用 -d 标志。
我的 php.ini 的相关部分如下所示:
[xdebug]
zend_extension="/usr/lib64/php/modules/xdebug.so"
xdebug.remote_enable = 1
xdebug.default_enable = 0
xdebug.profiler_output_dir = "/tmp/profiling"
# xdebug.profiler_enable = 1 # I uncomment this line to try to profile my script
我使用这两个命令之一调用脚本(并确保 ini 文件行被适本地注释掉(或不注释掉))。
$> /usr/bin/php scripts/daemon/PostProcess.php -c 4
或
$> /usr/bin/php -d xdebug.profiler_enable=1 scripts/daemon/PostProcess.php -c 4
我确信该设置被正确解释。
$> php -d xdebug.profiler_enable=1 --info | grep profile | less
xdebug.profiler_aggregate => Off => Off
xdebug.profiler_append => Off => Off
xdebug.profiler_enable => On => On
xdebug.profiler_enable_trigger => Off => Off
xdebug.profiler_output_dir => /tmp/profiling => /tmp/profiling
xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p
xdebug 可以正确地进行调试。以下命令工作正常:
$> /usr/bin/php -d xdebug.remote_autostart=On -d xdebug.remote_host=A.B.C.D scripts/daemon/PostProcess.php -c 4
有什么想法吗?
最佳答案
尝试使用 -ddisplay_errors=1 运行脚本以强制显示 PHP 错误。示例:
/usr/bin/php -ddisplay_errors=1 -d xdebug.profiler_enable=1 scripts/daemon/PostProcess.php -c 4
通常,当我遇到您描述的问题时,我的代码中有一个错误,默认情况下 display_errors 处于关闭状态,以防止在错误消息中可能泄露敏感细节。因此,带有错误的消息被隐藏了。查看这是否为您提供了更正问题的信息。
关于php - 从命令行进行 xdebug 分析不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25068919/
今天有小伙伴给我留言问到,try{...}catch(){...}是什么意思?它用来干什么? 简单的说 他们是用来捕获异常的 下面我们通过一个例子来详细讲解下
我正在努力提高网站的可访问性,但我不知道如何在页脚中标记社交媒体链接列表。这些链接指向我在 facecook、twitter 等上的帐户。我不想用 role="navigation" 标记这些链接,因
说现在是 6 点,我有一个 Timer 并在 10 点安排了一个 TimerTask。之后,System DateTime 被其他服务(例如 ntp)调整为 9 点钟。我仍然希望我的 TimerTas
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我就废话不多说了,大家还是直接看代码吧~ ? 1
Maven系列1 1.什么是Maven? Maven是一个项目管理工具,它包含了一个对象模型。一组标准集合,一个依赖管理系统。和用来运行定义在生命周期阶段中插件目标和逻辑。 核心功能 Mav
我是一名优秀的程序员,十分优秀!