Skip to content
Advertisement

Xdebug not available in Composer plugin

I’m trying to debug a Composer plugin with Xdebug. I have my environment set up (export XDEBUG_SESSION=1) and the Xdebug loaded in php.d. The script breaks at first line in Composer so everything works so far.

In a composer-plugin class method code I add an xdebug_break(). What I get when that code gets executed is Uncaught Error: Call to undefined function xdebug_break().

Does Composer spawn a crippled shell of sorts without the environment set or runs PHP without extensions? How can I fix this to debug the Composer plugin?

Advertisement

Answer

Found myself the answer: As per Xdebug documentation,

export COMPOSER_ALLOW_XDEBUG=1

did the trick.

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