有没有办法在Ubuntu 16.04上安装Xdebug for Php5?我尝试以与ubuntu 14.04相同的方式安装它,但每次我尝试安装php5-dev时都会收到此错误"E:Package'php5-dev'没有安装候选者"
我正在使用NetBeans 6.5开发PHP,我有xdebug设置.有没有办法告诉它不要在每次请求时停在文件的第一行?JIT模式不会解决这个问题,因为我不希望它停留在我捕获的每个异常上.
我还没弄明白这一点.我发现的每一篇文档都介绍了如何使用xdebug来调试在Apache中运行的脚本.我需要调试php CLI脚本.
那么,例如,如何传递XDEBUG_SESSION_START变量以使xdebug启动?
我特意尝试调试CakePHP shell.因此,如果有人对此有任何额外的见解,我会非常感激.
谢谢.
我花了几个小时来设置我的IDE以使用eclipse和xdebug来调试PHP.除了我在eclipse上设置的断点之外,一切都很好.如果我上线双击添加断点,调试器想不停止.如果一个添加行xdebug_break()调试器在该行停止以及...
这可能是配置问题.谁能帮助我?
的php.ini
[xdebug]
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_mode=req
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = "c:/temp"
xdebug.collect_params = 4
xdebug.collect_return = on
xdebug.collect_vars = on
xdebug.show_local_vars = 1
Run Code Online (Sandbox Code Playgroud) 如何在Netbeans的调试过程中更改行突出显示的背景颜色?

试图改变"突出插入行".没有成功.它只会改变光标闪烁的行的颜色,但不会改变调试行:

我已经阅读了很多答案,但无法弄清楚为什么xdebug不起作用.
php.ini中:
[xdebug]
zend_extension="/usr/lib/php5/20090626/xdebug.so"
Run Code Online (Sandbox Code Playgroud)
php -v:
PHP 5.5.6-1+debphp.org~precise+2 (cli) (built: Nov 21 2013 14:31:41)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies
Run Code Online (Sandbox Code Playgroud)
/usr/lib/php5/20090626/xdebug.so确实存在.php.ini中没有zend优化器.
如果我尝试安装xdebug:
pecl/xdebug is already installed and is the same as the released version 2.2.3
install failed
Run Code Online (Sandbox Code Playgroud)
提前致谢.
我有一段这样的代码:
$conn = new mysqli($host, $username, $passwd, $dbname);
...
$stmt = $conn->prepare('SELECT ...');
$stmt->bind_param(...);
$stmt->execute();
$stmt->bind_result(...);
while($stmt->fetch())
{
// do something here
}
$stmt->close();
...
// do something more here that has absolutely nothing to do with $stmt
Run Code Online (Sandbox Code Playgroud)
这完全没问题.我得到了我期望的结果,没有错误或任何不应该发生的事情.
但是,如果我设置一个断点(Xdebug 2.2.5/2.2.6/2.2.8/2.3.2和PHP 5.5.3/5.5.15/5.6.0/5.6.6/5.6.10)之后 的一行$stmt->close();,我得到很多警告
不允许财产访问
要么
无法获取mysqli_stmt
我以为我错过了关闭另一个mysqli声明,但我得到了所有结果.在我的代码中似乎没有问题......
有没有办法摆脱这个错误的警告?
更新:此问题仍存在于PHP 7.0.1/Xdebug 2.4.0 RC3中.
在以下IP下,我的容器在我的Webbrowser中成功运行
我还创建了一个卷来在我的容器和我的文件系统之间共享文件
docker run --name lampf -d -p 32775:80 -v /Users/sja/Sites/lamkepf2:/var/www/html --link=lampf_db:db codinglimo/apache_php540_gs_imgmck_pdflib9
Run Code Online (Sandbox Code Playgroud)
现在我使用以下xdebug.ini在我的容器中成功安装了xDebug
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.remote_enable=on
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=0
xdebug.profiler_output_dir="/temp/profiledir"
Run Code Online (Sandbox Code Playgroud)
PHPStorm也已配置
http://img2.picload.org/image/iowdpww/xdebug.png
但是我的index.php中的断点被忽略了?我的错是什么?
问题是在谢尔盖的帮助下解决的
我的新xdebug.ini
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.remote_enable=on
#xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_connect_back=On
xdebug.remote_handler=dbgp
xdebug.profiler_enable=0
xdebug.profiler_output_dir="/temp/profiledir"
Run Code Online (Sandbox Code Playgroud) 我能够在PHPStorm中设置一个php web app调试器,只需将它绑定到我在特定端口的localhost即可,一切正常.但是要实现这一点,我需要先在shell上运行此命令:
php app/console server:run --env=dev
Run Code Online (Sandbox Code Playgroud)
如果我设置断点来浏览网站本身或测试来自基于浏览器的休息客户端(如邮递员)的 api调用,这样就可以了
但是,我正在尝试为我的移动应用程序设置断点(移动应用程序将http调用发送到后端应用程序,这是一个symfony应用程序).使用Web应用程序配置不适用于此配置.
使用本教程,我能够将上述命令行合并到PHPStorm中,所以现在我可以使用phpstorm命令行工具实际运行代码.
我的问题是:如何将调试器实际绑定到PHPStorm中的命令行?现在,当我在PHPStorm中创建内置Web服务器时,它默认使用默认的php解释器(即如果我使用内置的Web服务器运行代码..我在PHPStorm的控制台中看到了这一点:
/usr/local/Cellar/php54/5.4.28/bin/php -S localhost:8000 -t /project/root/directory
Run Code Online (Sandbox Code Playgroud)
我想要的是这样的:
php app/console server:run --env=dev -S localhost:8000 -t /project/root/directory
Run Code Online (Sandbox Code Playgroud)
知道怎么做吗?
我为PhpStorm和xdebug配置了所有工作,我正在运行Ubuntu 14.04.
没有建立回IDE的连接,我在IDE事件Log中得到了这个
无法接受外部Xdebug连接:无法计算表达式'isset($ _ SERVER ['PHP_IDE_CONFIG'])' - Osama Salama 13分钟前
我将把我在不同地方配置的配置值放在一起.因为我无法找出问题所在
php.ini中
zend_extension = /usr/lib/php5/20121212/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_connect_back = 1
xdebug.remote_autostart = 1
xdebug.remote_log=xxx/xdebug.log
xdebug.IDE_key=PHPSTORM
Run Code Online (Sandbox Code Playgroud)
PHP信息
Xdebug的
xdebug support enabled
Version 2.3.1
IDE Key PHPSTORM
Supported protocols Revision
DBGp - Common DeBuGger Protocol $Revision: 1.145 $
Directive Local Value Master Value
xdebug.auto_trace Off Off
xdebug.cli_color 0 0
xdebug.collect_assignments Off Off
xdebug.collect_includes On On
xdebug.collect_params 0 0
xdebug.collect_return Off Off
xdebug.collect_vars Off Off
xdebug.coverage_enable On On
xdebug.default_enable …Run Code Online (Sandbox Code Playgroud) xdebug ×10
php ×8
phpstorm ×3
netbeans ×2
boot2docker ×1
cakephp ×1
colors ×1
debugging ×1
docker ×1
eclipse ×1
mysqli ×1
netbeans6.5 ×1
symfony ×1
ubuntu-16.04 ×1