やりたいこと
var_dumpでデバッグをしていたところ見たい値部分が「...」に省略されてしまい見れなかった。
省略させずに見る設定。
環境(今回の作業に関連ないものも記載)
- MacBookPro(macOSCatalina10.15.5)
- PHPStorm2020.2
- docker desktop2.2.0.3
- cakephp4.1.2
- xdebug2.9.6
実装
前提
以下構成で構築していることを前提とする。
https://qiita.com/learn_tech1/items/836d2ea84b518b8a2766
実装
下3行を追加。
Docker/php/php.ini
[xdebug]
xdebug.idekey="PHPSTORM"
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_host=host.docker.internal
xdebug.remote_port=9001
; var_dumpが省略されない設定
xdebug.var_display_max_children=-1
xdebug.var_display_max_data=-1
xdebug.var_display_max_depth=-1
docker-compose restart
で再起動すると反映される。
参考
ありがとうございます。
https://mawatari.jp/archives/do-not-omit-the-result-of-var_dump