xdebug

Xdebug laravel artisan commands

末鹿安然 提交于 2019-12-04 05:06:23
I regularly use xdebug to debug applications, I've built a laravel application that takes an upload of a csv inserts the data to the database and the ids to a job queue. I've written an artisan command to be run via cron to then do something with this data. Xdebug works for accessing the site via the browser, but its not breaking on breakpoints when ran from cli. I run php5-fpm. My files /etc/php5/fpm/php.ini and /etc/php5/cli/php/ini both contain the following settings: zend_extension=/usr/lib/php5/20121212/xdebug.so xdebug.remote_enable = 1 xdebug.idekey = 'dev_docker' xdebug.remote

Xdebug breakpoints always work except when using @runTestsInSeparateProcesses?

本秂侑毒 提交于 2019-12-04 04:57:31
问题 I finally got Xdebug working (including with breakpoints and the ability to "step over") for unit tests, feature tests, and for poking around in the browser. However, whenever I use @runTestsInSeparateProcesses because of this reason, Netbeans breakpoints no longer work. How can I use Xdebug breakpoints on tests that use @runTestsInSeparateProcesses ? I'm using Netbeans 8.2 on Windows 10 Version 1607 Build 14393.0. PHPUnit 5.7.21. I'm running Laravel 5.4 Homestead (which is Vagrant 1.9.5), so

Docker and XDebug not reading breakpoints VSCode

僤鯓⒐⒋嵵緔 提交于 2019-12-04 03:37:18
问题 I have been using XDebug with PHP Version 7.0.* for the last 6 months on a MAC using remote debugging to a Docker container. I was running an older version of docker that was using VirtualBox to VM for docker, all was working fine. I recently updated docker to version 17.03.1 and have had nothing but issues with xDebug. I have contacted the creator of vscode-php-debug via an issue on his repository and he then pointed me to take the issue up with xdebug and or docker. My issue is the

How to disable Xdebug loading for PHP CLI? [closed]

泄露秘密 提交于 2019-12-04 03:20:41
Im using composer, and when i do an update. It takes a huge chunk of time if xdebug is loaded in my php.ini file. How can i disable xdebug only for cli. So composer won't take as much time. Yet i will have xdebug enabled? Xees I found the answer by specifying a custom php.ini file for apache, and left the original php.ini file for cli. in your apache configuration file. Just write the following bit of code. <IfModule php5_module> PHPINIDir "C:/PATH/TO/CUSTOM/INI" </IfModule> 来源: https://stackoverflow.com/questions/19894042/how-to-disable-xdebug-loading-for-php-cli

PHP调试工具Xdebug安装配置教程

我的未来我决定 提交于 2019-12-04 03:11:35
说道PHP代码调试,对于有经验的PHPer,通过echo、print_r、var_dump函数,或 PHP开发工具zend studio 、editplus可解决大部分问题,但是对于PHP入门学习的童鞋来说有一定的难度,而且仅仅通过上述这些PHP调试手段,也很难准确发现PHP性能方面的问题,Xdebug是一个非常有用的PHP调试工具。   Xdebug作为PHP调试工具,提供了丰富的调试函数,也可将Xdebug安装配置为zend studio、editplus调试PHP的第三方插件,通过开启自动跟踪(auto_trace)和分析器功能,可以直观的看到PHP源代码的性能数 据,以便优化PHP代码。今天和大家分享PHP调试工具Xdebug安装以及配置方面的基础知识。   Xdebug在PHP中的安装配置涉及php.ini配置文件的修改。    Xdebug安装教程    下载Xdebug   首先我们需要 下载Xdebug ,务必根据安装的PHP版本,选择合适的Xdebug版本,由于我是在Windows环境下安装PHP的(请参考 Windows 7下安装配置PHP+Apache+Mysql环境教程 ),所以选择下载Windows版本的Xdebug2.1.0(5.3 VC6 (32 bit)),下载下来的Xdebug文件为php_xdebug-2.1.0-5.3-vc6.dll

How can i get the PHP magic constant __FILE__ work with Eclipse and PDT

血红的双手。 提交于 2019-12-04 02:57:57
Lately when i was debugging some PHP file with XDebug (under Eclipse on Ubuntu) i came across a strange behaviour: print(__FILE__); resulted in "xdebug eval" GEE! So this magic constant seems not to work with this. Anyone know a fix or a viable workaround? How to debug the debugger? (Hardcoding a path is a PITA!) Derick The output you get is not incorrect. __FILE__ is a special constant that gets evaluated at parser time. When the PHP script gets compiled, it would really read something like this: // test.php <?php "test.php"; ?> even though the script source was: // test.php <?php __FILE__; ?

nginx php-fpm xdebug netbeans can start only one debug session

两盒软妹~` 提交于 2019-12-04 02:53:22
In the past, I've used apache+mod_php +xdebug+netbeans for development my website (server is my local machine, running Debian Squeeze), with pleasure - xdebug worked just as expected, debug sessions could be started and stopped any time, when I need it. But, when I moved to nginx+php_fpm +xdebug+netbeans I've experienced some problems with debugging. My debug session could be very long (much more than 30 seconds) and it seems, that nginx couldn't wait so long, it shows "504 Gateway timeout error" . I've tried lots of recommendations for solve this, but no luck. Though, it is not a very

mysqli_affected_rows() returns -1 but query works

僤鯓⒐⒋嵵緔 提交于 2019-12-03 22:45:48
All my mysql functions seem to be having this problem. The simple insert statement works, but when I check the affected rows, it returns -1 . This works, a new row is inserted into the database with it, but debugger shows the mysqli_affected_rows as -1 , and therefore the else block gets run: $query = "INSERT INTO users (email, password) VALUES ('$email', '$password')"; mysqli_query($this->connection, $query) or die('Query failed in register.'); if (mysqli_affected_rows($this->connection)>0) { //this doesnt get run, } else { // this is run } Why would this happen? Edit: I'm using Netbeans,

How can I make NetBeans not stop on the first line with xdebug?

本秂侑毒 提交于 2019-12-03 22:18:02
I'm using NetBeans 6.5 for developing PHP and I have xdebug setup. Is there a way I can tell it not to stop on the first line of the file on every request? JIT mode won't fix this because I don't want it to stop on every exception that I catch. I just found my answer, you go to Tools > Options > PHP (section) and there is a checkbox for "stop at the first line" For Mac users, you go to the Netbeans > Preferences... and find it under the PHP section 来源: https://stackoverflow.com/questions/350966/how-can-i-make-netbeans-not-stop-on-the-first-line-with-xdebug

phpstorm断点配置xdebuger

萝らか妹 提交于 2019-12-03 19:22:13
配置php断点调试 找到php.ini配置文件 文件路径 :E:\wamp64\bin\apache\apache2.4.23\bin 找到xdebuger的配置信息位置。 添加配置信息 添加配置信息后重启服务器。 进入Localhost查看配置信息。 进入phpinfo。 能看到配置信息表示添加成功。 Phpstorm配置 配置调试服务器。 确认端口为9000 安装xdebuger Chrome –> 更多工具 –> 扩展程序。 添加完成 测试断点 注意:这种调试方式,是被动式的调试方式,需要触发! 有请求的时候,来触发脚本。 先给后台文件打一个断点 打开电话监听。 点绿的小虫子! Debugger 提交文件触发响应! 这样就可以查看后台运行情况。 调试工具 断点调试效果 xdebug.txt ; XDEBUG Extension zend_extension = "e:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11.dll" ; [xdebug] xdebug.remote_enable = off xdebug.profiler_enable = off xdebug.profiler_enable_trigger = off xdebug.profiler_output_name = cachegrind