Setting to not omit var_dump in Docker with xdebug set
Thing you want to do
When I was debugging with var_dump, the value part I wanted to see was omitted as “…” and I could not see it. The setting to see without omitting.
#Environment (including items not related to this work)
- MacBookPro (macOS Catalina 10.15.5)
- PHPStorm2020.2
- docker desktop2.2.0.3
- cakephp4.1.2
- xdebug2.9.6
Implementation
Assumption
It is assumed that the system is built with the following configuration. https://qiita.com/learn_tech1/items/836d2ea84b518b8a2766
Implementation
Added the bottom 3 lines.
[xdebug]
xdebug.idekey="PHPSTORM"
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_host=host.docker.internal
xdebug.remote_port=9001
var_dump is not omitted
xdebug.var_display_max_children=-1
xdebug.var_display_max_data=-1
xdebug.var_display_max_depth=-1
It is reflected when restarting with docker-compose restart
.
Reference
Thank you very much. https://mawatari.jp/archives/do-not-omit-the-result-of-var_dump