Skip to content
Advertisement

Failing to load Xdebug when running PHPUnit Tests

I have been having a option for a few days. When I try to run a PHPUnit test I get a message saying failed to load Xdebug. I have tried to reinstall, change filepaths etc but I am getting nowhere. Hoping somebody can help me out 🙂

JavaScript

enter image description here

Advertisement

Answer

Failing loading xxxx.dll is an indication that PHP can’t load the extension file. This could have several reasons:

  1. The file does not exist → check if it does

  2. The permissions on the file are incorrect → check the permissions

  3. The file is of “the wrong extension type”. Which can be either:

    • the extension is for the wrong wrong PHP version
    • the extension is of the wrong bitness (32 vs 64bit)
    • the wrong TS variant (NTS vs ZTS)
    • the wrong “debug mode” build of PHP (either debug, or nodebug)

The API type (except for bitness, which you can check with echo PHP_INT_SIZE;; 4 is 32bit, and 8 is 64bit) is reflected in the “Zend Extension Build” output in php -i or phpinfo().

You can use Xdebug’s wizard to tell you which exact file to download for your specific set-up.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement