Closed
Description
Description
I followed the documentation to enable Xdebug and connect it with PhpStorm, but encountered the following issues:
- The command
bin/xdebug enable
fails with the following error:
Invalid mode: enable
Valid modes are:
off
develop
coverage
debug
gcstats
profile
trace
- I then tried
bin/xdebug debug
, which worked for enabling debug mode. However, PhpStorm still doesn't receive any Xdebug connections, and breakpoints are not triggered.
This suggests:
- Either the documentation is outdated (
enable
is not a valid mode), - Or something is misconfigured between the container and PhpStorm.
Steps To Reproduce
- Clone and set up the project using markshust/docker-magento
- Run
bin/xdebug enable
→ Observe the "Invalid mode" error - Run
bin/xdebug debug
instead - Install Chrome Xdebug Helper and set IDE Key to
PHPSTORM
- Open PhpStorm and enable "Listen for PHP Debug Connections"
- Try to access the Magento frontend or a PHP file and hit a breakpoint
Expected Result
bin/xdebug enable
should work as documented- PhpStorm should receive incoming Xdebug connections
- Breakpoints should be triggered correctly
Actual Result
-
bin/xdebug enable
fails:
Invalid mode: enable -
PhpStorm does not receive any Xdebug connection
-
Breakpoints are not hit
Environment
- OS: macOS 15.1.1 (Build 24B91)
- Docker version: 27.4.0, build bde2b89
- PhpStorm version: 2025.1.1
- Magento version: 2.4.8
- Xdebug version in container:
php -v | grep Xdebug
with Xdebug v3.4.1, Copyright (c) 2002–2025, by Derick Rethans