Laravel5.5 homestead環境、phpstormにてxdebugを使用しようと思いhttps://www.tam-tam.co.jp/tipsnote/program/post13770.htmlのサイトを参考にしていました。
ちなみにphpのバージョンはこちら
php -v PHP 7.2.2-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Feb 1 2018 16:01:26) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.2-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies with Zend Server Z-Ray v9.2.0, Copyright (c) 2004-2017, by Zend Technologies with blackfire v1.18.2~linux-x64-non_zts72, https://blackfire.io, by SensioLabs
こちらのサイトによるとxdebugはhomesteadだと最初から入っているとのことなので、手順通り進めていく
→しかしphpstormの設定でひっかかる
→phpLanguageLevelを変更できない(phpstormはhomesteadのディレクトリでprojectを開いてます)
ちなみにbrew install php72-xdebug
にてinstallを試みてみましたが、以下のようなエラーが出ております。
Error: No available formula with the name "php72-xdebug" ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... Error: No formulae found in taps.
homesteadには最初からxdebugが入っているので、これはあまり関係ない気がしますが、phpstormの設定でできない部分の理由がよく分かりません。
よろしくお願いいたします。
質問を受けての追記
添付していただいたURLを参考に進めていったサーバ側のコマンドです。
(PHPのバージョンが7.2.2でしたので、/etc/php/7.2/fpm/conf.d/20-xdebug.iniにしました)
vagrant@homestead:~/code/school$ sudo apt-get install xdebug-* Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'php-xdebug' for regex 'xdebug-*' Note, selecting 'php7.0-xdebug' for regex 'xdebug-*' Note, selecting 'php5.6-xdebug' for regex 'xdebug-*' Note, selecting 'php7.1-xdebug' for regex 'xdebug-*' Note, selecting 'php7.2-xdebug' for regex 'xdebug-*' Note, selecting 'php-xdebug' instead of 'php5.6-xdebug' Note, selecting 'php-xdebug' instead of 'php7.0-xdebug' Note, selecting 'php-xdebug' instead of 'php7.1-xdebug' Note, selecting 'php-xdebug' instead of 'php7.2-xdebug' php-xdebug is already the newest version (2.6.0+2.5.5-1+ubuntu16.04.1+deb.sur 0 upgraded, 0 newly installed, 0 to remove and 230 not upgraded. vagrant@homestead:~/code/school$ php -v PHP 7.2.2-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Feb 1 2018 16:01:26) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.2-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 19 with Zend Server Z-Ray v9.2.0, Copyright (c) 2004-2017, by Zend Technolog with blackfire v1.18.2~linux-x64-non_zts72, https://blackfire.io, by Sens vagrant@homestead:~/code/school$ sudo su root@homestead:/home/vagrant/code/school# vi /etc/php/7.2/fpm/conf.d/20-xdebug.ini root@homestead:/home/vagrant/code/school# sudo service php7.2-fpm restart root@homestead:/home/vagrant/code/school#
また最後に[Run]-[debug]を行った際に出た画面はこちらです
質問を受けての追記②
php.iniにてzend_extensionをgrepかけましたが見当たりませんでしたので、zendでgrepかけてみました。
見つかった部分を記載しておきます。
; This setting is on by default. ;report_zend_debug = 0 ; Default Value: 1 ; Development Value: 1 ; Production Value: -1 ; http://php.net/zend.assertions zend.assertions = -1 ; Enables or disables the circular reference collector. ; http://php.net/zend.enable-gc zend.enable_gc = On ; If enabled, scripts may be written in encodings that are incompatible with ; the scanner. CP936, Big5, CP949 and Shift_JIS are the examples of such ; encodings. To use this feature, mbstring extension must be enabled. ; Default: Off ;zend.multibyte = Off
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/04/18 15:14
2018/04/19 06:55
2018/04/19 12:58
2018/04/26 23:19