Can’t install xdebug on Mac with Homebrew

// Working as of 2023 As homebrew removed the extra php repository containing a version with xdebug already installed, you have to install it manually. Summary brew install <php version> for php update your path pecl install xdebug for xdebug Full step-by-step example # update homebrew brew update # install a version of php, e.g. … Read more

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

The xdebug.profiler_enable setting can’t be changed at runtime but only at the start of script. Running phpunit -d foo=bar will just lead to phpunit calling ini_set(“foo”, “bar”); and that doesn’t work since the value can’t change at runtime. See: xdebug.profiler_enable Enables Xdebug’s profiler which creates files in the profile output directory. Those files can be … Read more

Debugging php-cli scripts with xdebug and netbeans?

I got this working on Ubuntu/Netbeans by: copying the xdebug config lines from the /etc/php5/apache2/php.ini file into /etc/php5/cli/php.ini setting an environment variable with the name of the debug session (you can get this from the query string in the url of the page netbeans launches when you start debugging) so the command is: export XDEBUG_CONFIG=”idekey=netbeans-xdebug” … Read more

netbeans shows “Waiting For Connection (netbeans-xdebug)”

Have you rectified the issue ? If not then please try this. 1.) php.ini file content [xDebug] zend_extension = “c:\xampp\php\ext\php_xdebug-2.2.3-5.4-vc9.dll” xdebug.remote_autostart=on xdebug.remote_enable=on xdebug.remote_enable=1 xdebug.remote_handler=”dbgp” ;xdebug.remote_host=”localhost:81″ xdebug.remote_host=192.168.1.5 ;xdebug.remote_connect_back=1 xdebug.remote_port=9000 xdebug.remote_mode=req xdebug.idekey=”netbeans-xdebug” xdebug.remote_host=192.168.1.5 – This is the IPv4 address of my system, I changed to this because I couldn’t debug with localhost and 127.0.0.1. in NetBeans IDE, … Read more

How to stop xdebug from stopping on first line with PhpStorm?

The above didn’t work for me because as far as I can tell if you’re using Xdebug the only debug bookmarklets you get is start/stop and debug this page. I don’t see any bookmarklet specific to stopping on first line, and neither the start/stop bookmarklets nor stopping PHPStorm from listening within PHPStorm fixed the problem … Read more

Check if xdebug is working

Without actually doing some debugging, I guess you can’t be certain that a debugger is working. But you can be pretty sure — I guess one should assume that if some aspects of xDebug are working then it would all be working. Given that, you can confirm that xDebug is installed and in place by … Read more

XDebug and RESTful server using PHPStorm or POSTman

You can use one of these approaches: Configure your Xdebug (by editing php.ini) to attempt to debug every PHP script. The key option: Xdebug v2: xdebug.remote_autostart = 1 Xdebug v3: xdebug.start_with_request = yes Add Xdebug session start parameter to the actual URL (XDEBUG_SESSION_START={{KEY}} — https://xdebug.org/docs/step_debug#manual-init), for example: ?XDEBUG_SESSION_START=PHPSTORM Pass Xdebug cookie as part of the … Read more

Disabling xdebug when running composer

Update: For Xdebug 3+: As of Xdebug 3, it is possible to disable the Xdebug completely by setting the option xdebug.mode to off, or by setting the environment variable XDEBUG_MODE=off. It is very easy to disable Xdebug just for composer, by aliasing composer. alias composer=”XDEBUG_MODE=off \composer” OR alias composer=”php -dxdebug.mode=off $(where composer | fgrep -v … Read more

Increasing nesting function calls limit

This error message comes specifically from the XDebug extension. PHP itself does not have a function nesting limit. Change the setting in your php.ini: xdebug.max_nesting_level = 200 or in your PHP code: ini_set(‘xdebug.max_nesting_level’, 200); As for if you really need to change it (i.e.: if there’s a alternative solution to a recursive function), I can’t … Read more