xdebug

vscode 调试 PHP 打造PHP本地开发环境

廉价感情. 提交于 2020-01-01 06:00:47
1.首先安装vscode 1.8.1 http://code.visualstudio.com/Download 2.安装完成之后,在VSCODE中安装PHP需要的扩展 如下图: 3.安装PHP7.1,PHP7.1是一个压缩包,下载之后解压到一个目录 http://windows.php.net/downloads/releases/php-7.1.1-nts-Win32-VC14-x64.zip 解压之后将PHP目录添加系统环境变量 PATH 中。 4.安装PHP调试用的扩展 DLL https://xdebug.org/files/php_xdebug-2.5.0-7.1-vc14-x86_64.dll 将DLL复制到PHP所在目录的ext目录下,然后配置 php目录下的 php.ini(如果目录下没有,复制一份php.ini-development 改成 php.ini) 在最后添加三行 zend_extension = php_xdebug-2.5.0-7.1-vc14-x86_64.dll xdebug.remote_enable = 1 xdebug.remote_autostart = 1 5.安装FIREFOX(必须安装,不然PHP SERVER启动不了) 开始调试 来源: https://www.cnblogs.com/nopassword/p/6308791

PHP XDebug Sublime Text 单步调试

∥☆過路亽.° 提交于 2020-01-01 06:00:30
前置环境:已经安装好LNMP 1. 安装xdebug 可以通过pear包管理来安装 sudo apt-get install php-pear sudo pecl install xdebug 这里我们直接通过apt安装 apt-get install php5-xdebug 程序已经自动创建了默认的配置文件 配置: xdebug.ini位置:/etc/php5/mods-available/xdebug.ini 新增如下 zend_extension="/usr/lib/php5/20131226/xdebug.so" xdebug.profiler_output_dir=/tmp xdebug.profiler_output_name=cachegrind.out.%p xdebug.profiler_enable_trigger=1 xdebug.profiler_enable=true xdebug.remote_enable=true xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.remote_handler=dbgp xdebug.remote_mode = req xdebug.remote_connect_back = 1 xdebug.remote_autostart=0 xdebug

Remote Xdebug with VirtualBox

心已入冬 提交于 2019-12-31 10:48:04
问题 I'm trying to get remote debugging to work. The PHP is running on a VM and I'm trying to debug from NetBeans on the host machine. I've followed the instructions here, forwarded port 9000 in the Windows 7 firewall and in the VirtualBox network settings, and set up path mappings in NetBeans. My xdebug settings look like this: xdebug.remote_enable = On xdebug.remote_connect_back = On xdebug.idekey = "netbeans-xdebug" xdebug.remote_log = /tmp/xdebug.log When I load the URL I want to debug (using

Remote Xdebug with VirtualBox

旧城冷巷雨未停 提交于 2019-12-31 10:47:08
问题 I'm trying to get remote debugging to work. The PHP is running on a VM and I'm trying to debug from NetBeans on the host machine. I've followed the instructions here, forwarded port 9000 in the Windows 7 firewall and in the VirtualBox network settings, and set up path mappings in NetBeans. My xdebug settings look like this: xdebug.remote_enable = On xdebug.remote_connect_back = On xdebug.idekey = "netbeans-xdebug" xdebug.remote_log = /tmp/xdebug.log When I load the URL I want to debug (using

phpize won't work on Mac OS X Lion

雨燕双飞 提交于 2019-12-31 09:11:13
问题 I try to install xdebug but I get the follow error message about 'phpize'. How can I fix this thing? leny:~ nick$ sudo pecl install xdebug Password: downloading xdebug-2.1.2.tgz ... Starting to download xdebug-2.1.2.tgz (304,229 bytes) ............done: 304,229 bytes 66 source files, building running: phpize Configuring for: PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 220090626 Cannot find autoconf. Please check your autoconf installation and the $PHP

Vagrant + Xdebug + Atom

▼魔方 西西 提交于 2019-12-31 07:11:05
问题 I have a vagrant box with xdebug installed, running on OSX, but Im struggling to get the Atom xdebug plugin ( php-debug ) to connect to it. I pasted the phpinfo(); data into the xdebug validation site and it said all was good. And you can see all the xdebug settings. I have mapped port 9000 in the vagrant file. config.vm.network :forwarded_port, guest: 9000, host: 9000 The vagrant box has host only network that exposes 192.168.10.100 as the IP of the server. And I've tried all manner of

How to runtime disable xDebug's var_dump and errors prettify?

自作多情 提交于 2019-12-31 05:46:06
问题 I sometimes prefer to use header("Content-type: text/plain"); Do not mess around with HTML. However, whenever an error occurs, or when I use var_dump() , it would issue a large HTML block to prettify the output. While it's great in HTML context, I would like to disable it when I work in text/plain. Is it possible to do? Runtime disable of the prettify? 回答1: XDebug will show you an error if PHP HTML errors are enabled. You can do one of the following You can disable php errors from displayed.

XDebug really slow

断了今生、忘了曾经 提交于 2019-12-31 01:40:06
问题 I am trying to get XDebug working on my local wamp installation (Uniform Server 8). However when I put xdebug.remote_enable=1 in my php.ini, which is required for my IDE to use xdebug, loading the pages gets really slow as in 5 seconds per page slow. The debugger works though. I haven't used xdebug before but I can imagine that it normally shouldn't take this long. I'm pretty sure it might have something to do with using the symfony2 framework. Does anyone have an idea what's causing this?

PhpStorm配置远程xdebug

谁都会走 提交于 2019-12-30 19:08:10
安装XDebug 安装就不细说了,攻略很多,这里主要讲配置。 安装攻略: 源码安装 xdebug,并在 vscode 中配置 php.ini配置: 注释掉的都可以不要 zend_extension=xdebug.so ; xdebug 的远程连接开关,必须开,关了就不发消息给IDE。 xdebug.remote_enable=1 ; 这个配置是2.9版之前的。我装的2.9,配了没用。phpstorm里也不需要配。 ; xdebug.remote_handler=dbgp ; 设为req,脚本启动马上连接IDE;设为jit,出现错误时才连接。默认就是req,所以不用配。 ; xdebug.remote_mode=req ; 客户端的地址,装IDE的电脑IP。(猜想配置了速度快些,因为不用去找了) xdebug.remote_host=10.0.31.208 ; 自动找IDE的地址,配置了这一项,xdebug.remote_host 会被忽略。更灵活,换了IP不用改配置。 ; xdebug.remote_connect_back=1 ; 客户端IDE的通信端口,连不上可能会被windows的防火墙挡住 xdebug.remote_port=9100 ; IDE密钥,不配置,就会给个默认值。配了就优先给这里。很多攻略强调了这个配置,实际可以不配。 ; xdebug.idekey

Xdebug + XAMPP + Netbeans = fail. Cannot get debugger to work in Netbeans

老子叫甜甜 提交于 2019-12-30 11:07:57
问题 I've read other questions regarding this topic. The listed solutions haven't worked. Installed: XAMPP 1.7.7 Netbeans 7.1.1 XDebug 2.1.4 phpinfo() shows that Xdebug is installed with all the correct parameters: zend_extension = C:\xampp\php\ext\php_xdebug-2.1.4-5.3-vc9.dll xdebug.remote_enable = on xdebug.remote_handler = "dbgp" xdebug.remote_host = "localhost" xdebug.remote_port = 9000 However, when I start a Netbeans debug session, it cycles for awhile with no effect. When I stop it, I get