0
0

More than 3 years have passed since last update.

xdebugを設定したDockerでvar_dumpを省略させないための設定

Posted at

やりたいこと

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

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0