PhpStorm (IntelliJ IDEA)에서 새로운 Laravel 프로젝트 생성부터 로컬 디버그 환경 구축까지
운영 환경
Windows 7
IntelliJ IDEA 2018.3.4
PHP 7.3.2
Xdebug v2.7.0RC2
Laravel Framework 5.8.2
전제 조건
배경
평소 Unity+Rider로 개발하고 있습니다
디버그시에는 디버그 버튼 누르는 것만으로 브레이크 포인트가 유효하게 되어 스텝 실행이 가능하게 됩니다
효율적으로 디버깅을 해내는데 브레이크 포인트의 유효가는 필수이므로 이번 환경 구축을 실시했습니다
1 클릭으로 로컬 서버 시작 → 디버깅 시작 가능
PHP 설치
PHP 다운로드
- C 드라이브 바로 아래에 배포 (C:\php-7.3.2)
- php.ini-development를 복사하여 php.ini로 이름 바꾸기
- php.ini 없음 아래 설정의 코멘트 아웃을 해제
;extension_dir = "ext"
;extension=openssl
;extension=mbstring
;extension=pdo_mysql
Xdebug 설치
Xdebug
php --info
에서 출력되는 정보를 복사하여 위 사이트에 붙여 넣기 Analyse my phpinfo() output
zend_extension = php_xdebug-2.7.0RC2-7.3-vc15-x86_64.dll
추가 PhpStorm (IntelliJ IDEA)으로 새로운 Laravel 프로젝트 생성


시작 확인
php artisan key:generate # APP_KEYの生成
php artisan serve
에서 로컬 서버를 시작하고 localhost:8000 에 액세스하여 시작할 수 있는지 확인합니다.
Built-in Web Server 설정
php artisan serve
에서 로컬 서버를 시작했지만 Xdebug를 사용하여 디버깅을 위해 PhpStorm에서 설정을 수행합니다.-Name: Build-in Web Server
-Host: localhost
-Port: 8000
-Document root:<프로젝트 디렉토리>/public
-Interpreter options:
-dxdebug.remote_enable=1 -dxdebug.remote_autostart=1 -dxdebug.remote_host=localhost -dxdebug.remote_port=9000

xdebug 설정
파일 -> 설정 -> PHP

파일 -> 설정 -> PHP -> 디버그 -> Xdegug

파일 -> 설정 -> PHP -> 서버

디버그 실행
또는

브레이크 포인트를 사용하여 http://localhost:8000

수화기 마크가 빨간색 프레임처럼 보이지 않는다는 점에 유의하십시오.

좋은 디버그 생활 (๑•̀ㅂ•́)و✧
Reference
이 문제에 관하여(PhpStorm (IntelliJ IDEA)에서 새로운 Laravel 프로젝트 생성부터 로컬 디버그 환경 구축까지), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/imp954sti/items/68254345b85db24aa533텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)