xdebug

How can I debug a PHP CLI script with xdebug?

眉间皱痕 提交于 2019-11-29 22:22:18
I haven't quite figured this out. EVERY piece of documentation I've found covers how to use xdebug to debug scripts running in Apache. I need to debug a php CLI script. So, for instance, how do I pass the XDEBUG_SESSION_START variable in to get xdebug to kick on? I'm specifically trying to debug a CakePHP shell. So if anyone has any additional insight into that I'd be very appreciative. Thanks. Pascal MARTIN There is a couple of notes about that in Xdebug's manual , like, for instance (quoting) : export XDEBUG_CONFIG="idekey=session_name" php myscript.php If you are using Eclipse PDT to

PhpStorm_Xdebug断点调试PHP

空扰寡人 提交于 2019-11-29 20:42:47
运行环境: PHPSTORM版本 : 8.0.1 PHP版本 : 5.6.2 xdebug版本:php_xdebug-2.2.5-5.6-vc11-x86_64.dll ps : php版本和xdebug版本一定要相对应 1. PHP安装xdebug扩展 php.ini的配置,下面的配置仅供参考,路径要换成自己的! [xdebug] zend_extension="D:\wamp\php-5.6.2-x64\ext\php_xdebug-2.2.5-5.6-vc11-x86_64.dll" xdebug.remote_enable = On xdebug.remote_handler = dbgp xdebug.remote_host= localhost xdebug.remote_port = 9000 xdebug.idekey = PHPSTORM ps : remote_handler 、 remote_host、 remote_port 这些都有默认值,但还是建议设置下,至少知道要设置这些参数~ 查看phpinfo~ 2.PHPSTORM设置 楼主以前一直用zendstudio,刚开始用phpstorm非常蛋疼,用了一段时间后发现还挺好用的~ 1.首先检查phpstorm的xdebug配置 这里的debug port要和php.ini里面的 xdebug.remote

给PHPSTORM添加XDEBUG调试功能

强颜欢笑 提交于 2019-11-29 20:42:28
1、运行环境 nginx 1.0.14 php with fpm-cgi 5.5.9 mac os X 2、安装步骤 1)install xdebug wget http://xdebug.org/files/xdebug-2.2.3.tgz tar xzvf xdebug-2.2.3.tgz && cd xdebug-2.2.3 /path-to-your-php-root/bin/phpize ./configure –enable-xdebug –with-php-config=/path-to-your-php-root/bin/php-config 修改你的php.ini配置,添加: zend_extension=/server/php/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so xdebug.idekey=”PHPSTORM” xdebug.remote_host=127.0.0.1 ;注意端口为9001,默认为9000,因为跟fpm冲突所以要修改 xdebug.remote_port=9001 xdebug.remote_enable=on */path-to-your-php-root/ 指你电脑里php的安装根目录,注意替换。 2)重启fpm和nginx kill -USR2 fpm主进程id

How can I get XDebug to run with PHPUnit on the CLI?

ε祈祈猫儿з 提交于 2019-11-29 20:34:53
I've tried running the following CLI command: phpunit -d xdebug.profiler_enable=on XYZTestCase.php but it just runs as normal. Can anyone point me in the right direction?? Thx! Here's the XDebug settings: xdebug xdebug support => enabled Version => 2.1.2 Supported protocols => Revision DBGp - Common DeBuGger Protocol => $Revision: 1.145 $ Directive => Local Value => Master Value xdebug.auto_trace => Off => Off 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

PHP Xdebug on OS X 10.9 Mavericks

痞子三分冷 提交于 2019-11-29 19:12:02
I'm having issues setting up my PHP development environment on OS X after installing OS X 10.9 Mavericks. Here is the command I am using to install. sudo pecl install xdebug downloading xdebug-2.2.3.tgz ... Starting to download xdebug-2.2.3.tgz (250,543 bytes) .....................................................done: 250,543 bytes 66 source files, building running: phpize grep: /usr/include/php/main/php.h: No such file or directory grep: /usr/include/php/Zend/zend_modules.h: No such file or directory grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory Configuring for: PHP

PHPStorm + XDebug + Vagrant

ⅰ亾dé卋堺 提交于 2019-11-29 19:03:08
问题 This question is about getting XDebug working in PHPStorm, when the project is running inside a local virtual machine which uses Vagrant. I haven't found any comprehensive manual how to get this running so far. Applies to PHPStorm 7.0. The things I would like to have covered in the answer: How should the XDebug configuration be set inside the VM? (xdebug.ini) Is there a need to enable any additional ports in Vagrantfile? How should the 'server' be set in PHPStorm? How should the file mapping

xdebug Time-out connecting to client. :-( using phpstorm 7.1.3/vagrant/virtualbox/magento

穿精又带淫゛_ 提交于 2019-11-29 17:26:40
问题 For a while, I was using Phpstorm EAP, and had xdebug running perfectly. I recently purchased a personal license and imported all my settings from the EAP into 7.1.3. Now xdebug does not work. Here's xdebug.ini zend_extension=xdebug.so xdebug.remote_host = 192.168.56.1 xdebug.remote_cookie_expire_time = 36000 xdebug.remote_log = /tmp/xdebug.log xdebug.remote_port = 9000 xdebug.remote_handler = dbgp xdebug.remote_mode = req xdebug.remote_enable = 1 xdebug.remote_autostart = 0 xdebug.idekey=

How to make PHP set HTTP status code to 500 automatically in case of any error condition? (including those that cannot be handled by user)

穿精又带淫゛_ 提交于 2019-11-29 16:53:57
I am running Apache 2.2.15 with PHP 5.3.2, 'display_errors' disabled, 'display_startup_errors' disabled, 'log_errors' enabled. At my setup (so I consider it a norm), PHP aborts on fatal errors, which is good, and sets HTTP status code to 500 . Fatal errors include E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR and, probably, E_RECOVERABLE_ERROR (cannot trigger it myself, so can't easily check what happens). I think it is a good idea that it does set the code to 500, because I think it is the right thing to do - obviously if your script contains syntax errors and/or fails to do

phpeclipse+xdebug配置

泄露秘密 提交于 2019-11-29 16:27:14
一、安装配置 1、访问 http://www.phpeclipse.com/ ,找到右边的 1.2.x dev nightly下的http://update.phpeclipse.com/update/nightly_1.2.x 路径。 2、打开eclipse找到help->Intall New software updates,点击右侧的 add site后填入:Eclipse 安装php插件,http://update.phpeclipse.com/update/nightly_1.2.x ,然后全选择,点击next即可安装。 3、XMAPP 下载安装 访问 XMAPP页面 下载xampp-win32-1.7.7-usb-lite 安装包。 解压 D:\xampp。修改配置文件,xampp\apache\conf\httpd.conf,这里做了2个修改。 端口修改为81,同时将Include "conf/extra/httpd-dav.conf"注释起来。 执行 setup_xampp.bat,访问下面url能正常出来,则xmapp环境没问题。 http://localhost:81/xampp/phpinfo.php 4、启动xdebug XAMPP 1.7.2 捆绑了相应的 Xdebug .dll 文件。只需配置 php.ini 即可使用该文件。请注意,所有 Xdebug

XDebug is not loaded in PHP (Vista, Apache Module)

北战南征 提交于 2019-11-29 15:40:39
问题 I downloaded php_xdebug-2.0.5-5.3-vc9.dll, added at the end of PHP.ini the following line: zend_extension_ts="C:/Program Files/php5/ext/php_xdebug-2.0.5-5.3-vc9.dll" When I use phpinfo(), xdebug is not loaded. When I run command "php.exe -m", it not loaded as well. How can this be resolved? My configuration: PHP 5.3.1, Apache 2.2.14 with Apache Module, OS: Windows Vista Both php and xdebug are thread safe. This is somewhat similar with: Apache not loading Xdebug, but does when started from