xdebug

Xdebug unable to connect to client, where do I start debugging the debugger?

我与影子孤独终老i 提交于 2019-12-30 04:06:13
问题 I'm setting up xdebug for php within sublime text, and xdebug keeps on logging errors related to being unable to connect: Log opened at 2016-08-18 21:06:01 I: Connecting to configured address/port: localhost:9988. E: Could not connect to client. :-( Log closed at 2016-08-18 21:06:01 I hoped that debugging directly by going to http://localhost:9988 in my browser might help, but it simply displays the google chrome error page: "localhost refused to connect". Perhaps the error exists on the

Profiling Code on Production

孤街浪徒 提交于 2019-12-30 01:20:24
问题 I'm toying around with the idea of implementing something that profiles code on the production server and wanted some best-practice advice. Obviously it's a bad idea to profile ALL requests because of the added overhead so I was looking into some techniques that will randomly invoke the profiler per request. Something like 1 profile per every 10,000 requests. I know there is a way to achieve such a task with Facebook's XHProf Profiler but was hoping for a similar solution using xdebug. So my

本地环境 XAMPP+phpStorm+XDebug+chrome配置和断点调试

与世无争的帅哥 提交于 2019-12-29 12:04:01
不明白phpStorm+XAMPP+chrome组合的phpStorm配置XDebug的断点调试,很多种网页办法都看过了,可用,但没达预期。QQ群问,一个大牛很奇怪我都配置了怎么还不正确,很干脆地说远程协助。哈爽快人说爽快话给办利落的事,我还没说感谢呢大牛就直接说有事88。 今天me总算明白了,其实很容易理解的,休闲的时间把配置过程写了,顺便mark下,需要的人来看看。其实今天《爱你,万缕千丝》正在放映,我追看的,今天恰逢之元、天丘因家族利益出现大吵,所谓一部戏铺垫完、到了矛盾激化到极点、将要迎接剧终的时候,我写这个配置过程忘了看了竟然给,找空补上。希望这个配置过程你读起来像是一本故事,或者是拍拍砖: 我的安装环境:XAMPP版本号V3.1.0 ;phpStorm版本8.0.3;windowsxp 32bit。您老人家先过目一下,不然怕影响意义。 XAMPP、phpStorm 都直接安装在了D盘根目录,9999m目录建在D:\xampp\htocts下,即目录工程文件夹路径为D:\xampp\htocts\9999m。在phpStorm>File>open,找到9999m,点击确定,加载9999m到了phpStorm(安装环境路径根据需要自行更改,后面的配置内容也类似)。图1 1. 开始服务器端配置:安装好XAMPP,停止apache服务(注意,如果直接退出XAMPP

phpstorm设置断点过程

一曲冷凌霜 提交于 2019-12-29 12:03:23
1.为php安装xdebug,方法在上一篇中有详细介绍 2.注意这个时候需要修改php.ini内容如下: [Xdebug] zend_extension_ts ="d:/wamp/php/ext/php_xdebug-2.1.2-5.2-vc6.dll" xdebug.auto_trace=On xdebug.collect_params=On xdebug.collect_return=On xdebug.trace_output_dir="d:/wamp/php/debuginfo" xdebug.profiler_enable=On xdebug.profiler_output_dir="d:/wamp/php/debuginfo" xdebug.idekey=PhpStorm xdebug.remote_enable=on xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.remote_handler=dbgp 3.phpstorm配置 客户端调试,打开 phpStorm ,进入File>Settings>PHP>Servers,这里要填写服务器端的相关信息,name填localhost,host填localhost,port填80,debugger选 XDebug 进入File>Settings>PHP

phpstorm设置断点调试

断了今生、忘了曾经 提交于 2019-12-29 12:02:56
环境是:wamp PHP Version: 5.5.12 网上的教程很多,我自己按照教程操作,实现了断点调试,下面是我设置断点调试的步骤 1.修改配置文件php.ini,按下面修改(位置在最后) ; XDEBUG Extension zend_extension = "D:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11.dll" ; [xdebug] xdebug.remote_enable = on xdebug.remote_host="127.0.0.1" xdebug.port=9000 xdebug.profiler_enable = on xdebug.profiler_enable_trigger = off xdebug.profiler_output_name = cachegrind.out.%t.%p xdebug.remote_autostart=on xdebug.profiler_output_dir = "D:/wamp/tmp" xdebug.show_local_vars=0 xdebug.idekey = PHPSTORM 修改完后重启服务 用phpinfo查看,出现如下配置,则代表修改成功 2.phpstorm设置 File->Settings-> PHP->Server

【XDebug】PHPStorm+XDebug+Firefox

谁都会走 提交于 2019-12-29 12:01:59
本地环境:windows 7 64位 PhpStorm版本:2016.1 PHP版本:5.6 参考: Xdebug+phpstorm配置 参考: 本地环境phpStorm10+XDebug配置和断点调试 第一步:安装Xdebug 本地的环境是用phpStudy搭建的,直接在phpStudy可以勾选Xdebug: 其他选项菜单-PHP扩展及设置-PHP扩展-Xdebug勾选(默认不勾选) 第二步:配置php.ini 在php.ini中配置以下信息: [ XDebug ] xdebug . profiler_output_dir = "D:\phpStudy\tmp\xdebug" xdebug . trace_output_dir = "D:\phpStudy\tmp\xdebug" zend_extension = "D:\phpStudy\php\php-5.6.27-nts\ext\php_xdebug.dll" xdebug . remote_enable = 1 //是否允许远程终端 这里标示开启 xdebug . profiler_enable_trigger = 0 xdebug . remote_handler = dbgp xdebug . remote_mode = req xdebug . remote_host = localhost xdebug .

CentOS 下安装xdebug

随声附和 提交于 2019-12-29 11:59:15
在CentOS 6.x 的系统中,是集成xdebug 的, yum install php-pecl-xdebug 如果是CentOS.5 也可能通过安装安装 epel 来安装 rpm -ivh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm 然后 yum install php-pecl-xdebug 再在php.ini 配置文件添加xdebug 内容就可以了。如果是yum安装的php,默认路径在/etc/php.ini [Xdebug] zend_extension_ts =/usr/lib64/php/modules/xdebug.so zend_extension =/usr/lib64/php/modules/xdebug.so xdebug.auto_trace = on xdebug.auto_profile = on xdebug.collect_params = on xdebug.collect_return = on xdebug.profiler_enable = on xdebug.trace_output_dir = "/tmp" xdebug.profiler_output_dir = "/tmp" xdebug.dump.GET = * xdebug

PHP环境中安装pear、phpunit以及xdebug全攻略

拥有回忆 提交于 2019-12-29 11:58:39
首先,本文是基于wamp环境的基础上的,所以,如果您看到这里还没有搭建好wamp环境的话,介意您先把环境搭建好,因为这里都是一些实践性的内容。 1.准备 wamp环境中,我使用的各个软件的版本如下 windows 2003 Standard Edition SP2 apache HTTP Server 2.3 mysql 5.1.49 php 5.4.5 以上环境的搭建我就不赘述了,网上资料很多,通常也不会出现什么错误,但是如果您使用windows 7来部署的话,注意一下权限的问题就好了,所有的操作使用管理员权限,接下来的内容才是我要着重写的,因为这里经常会出一些意想不到让人头疼并且不容易解决的问题。 首先,需要准备如下内容 pear包,打开这个网址( 点击这里 ),将下载的文件保存到php的根目录里,go-pear.phar 2.安装 2.1安装pear 首先打开CMD命令, 如果您使用windows 7安装的话,之后所有的CMD命令行都介意用管理员权限来打开,当然,是在您可以获得管理员权限的前提下。 cd到php的安装目录(cd会吗?不会@百度吧), 执行命令:php go-pear.phar 这里输入“local”,回车 接下来是让您输入“yes”以确认操作,接下来一直回车就行了 , 不需要选什么1-12 最后出现如下提示 这里您在命令行中输入pear,出结果

Vim XDebug调试PHP php远程调试

若如初见. 提交于 2019-12-29 11:58:02
xdebug 配置 xdebug 安装 原文地址: http://xiaobin.net/201007/using-vim-and-xdebug-to-debug-php-code/ 原理上,这种调试方式主要依靠Vim的插件“ remote PHP debugger ”来实现,该插件实现了一个 DBGP 服务端。调试的时候Xdebug将会与服务端建立一个连接进行通信,接收服务端的调试指令并返回调试结果。 安装和配置 XDebug 安装: ubuntu 下直接 apt-get install php5-xdebug 安装 到 /usr/lib/php5/20090626+lfs 即可看到xdebug.so 可拷贝到你指定的模块地址 配置:( php.ini 文件) 加载Xdebug扩展: zend_extension=/ <extension_dir> /xdebug.so #<extension_dir>为你拷贝到的目录 配置xdebug开启dbgp远程调试 xdebug.remote_enable=on xdebug.remote_handler=dbgp Vim的Debugger插件 这个简单,只需要将插件下载回来,解压放到~/.vim/plugin目录 调试过程 用Vim打开要调试的PHP文件,按 <F5> 进入调试状态。请移步《 PHP调试指南 》,上面写的详细一些。

PHPStorm unable to make external connection with xdebug

夙愿已清 提交于 2019-12-29 07:29:06
问题 My OS is Mac Mountain lion. My PhpStorm version is 5.0.4. Here is my php xdebug info: xdebug.remote_autostart => Off => Off xdebug.remote_connect_back => Off => Off xdebug.remote_cookie_expire_time => 3600 => 3600 xdebug.remote_enable => On => On xdebug.remote_handler => dbgp => dbgp xdebug.remote_host => 127.0.0.1 => 127.0.0.1 xdebug.remote_log => data/logs/xdebug.log => data/logs/xdebug.log xdebug.remote_mode => req => req xdebug.remote_port => 9000 => 9000 xdebug.idekey => no value => no