CLI Interpreture isn't using `exec` properly: can't see xdebug

I'm trying to get a CLI interpreter setup for my project. I have a setup that dynamically adds in xdebug based on a startup ENV flag. In short, ENABLE_XDEBUG sets on startup:

Entrypoint `` enables xdebug on startup:

# Enable xdebug if requested
if [ ! -z "$ENABLE_XDEBUG" ]; then
echo "*** Enabling xdebug"
docker-php-ext-enable xdebug

I have verified I can see XDebug when logging into my container:

$ docker-compose exec web php -i
PHP Version => 7.4.27


However, IntelliJ cannot see it:

IntelliJ info:

IntelliJ IDEA 2021.3.1 (Ultimate Edition)
Build #IU-213.6461.79, built on December 28, 2021
Licensed to {Me}
Subscription is active until March 9, 2022.
Runtime version: 11.0.13+7-b1751.21 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 10

Non-Bundled Plugins:
org.toml.lang (213.5744.224)
org.jetbrains.plugins.go-template (213.5744.190)
name.kropp.intellij.makefile (213.5744.224)
com.jetbrains.plugins.ini4idea (213.5744.190)
com.intellij.plugins.html.instantEditing (213.5744.122)
com.jetbrains.php (213.6461.83)
org.jetbrains.plugins.phpstorm-remote-interpreter (213.5744.125)
com.jetbrains.twig (213.5744.224)
com.jetbrains.php.blade (213.6461.21)
de.espend.idea.laravel (0.15.4)
org.jetbrains.plugins.phpstorm-docker (213.5744.125)
com.intellij.kubernetes (213.6461.19)
aws.toolkit (1.36-213)
ru.adelf.idea.dotenv (2021.3.0.213)

Kotlin: 213-1.5.10-release-949-IJ6461.79

Comment actions Permalink

Unfortunately, it's a bug, the entrypoint is being ignored by the PHP interpreter. Please vote:

Comment actions Permalink

I had a feeling there was an issue with the entrypoint, which is why I went the `exec` route - my container is actively running and works. It's doing something else (stupid) with `exec`. Nonetheless, I'll +1 that bug report, too.


Please sign in to leave a comment.