Using PhpStorm’s Docker Integration to Debug PHP Apps Without Leaving the IDE
Learn how PhpStorm’s Docker integration lets you run, debug, and edit PHP code inside containers without leaving the IDE, plus the trade‑offs to watch for.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how PhpStorm’s Docker integration lets you run, debug, and edit PHP code inside containers without leaving the IDE, plus the trade‑offs to watch for.
Learn how to configure PhpStorm Professional to use a PHP‑FPM container from docker‑compose as a remote CLI interpreter, with path mappings and Xdebug debugging.
Most PhpStorm Xdebug failures are path-mapping problems, not php.ini problems. Validate the mapping first, then wire up Docker or CLI debugging.
Follow a step‑by‑step checklist to fix PhpStorm Xdebug breakpoints that are ignored during debugging sessions.
Interoperability boundary When a project uses a docker-compose.yml service as the PHP CLI interpreter in PhpStorm, the IDE derives container paths from the compose volume mounts and working_dir . At the same time, Xdebug 3 expects matching path mappings in Settings > PHP > Servers and container‑side environment variables such as XDEBUG_MODE , XDEBUG_CL
The goal is to confirm that PhpStorm’s Docker integration does not unintentionally expose the Xdebug debugger to external hosts when a container’s network mode changes. PhpStorm can map the local project into the container and launch a debug session, relying on Xdebug’s remote_connect_back flag to determine which IP addresses may connect to the debugger. It