1. Download Xdebug
⬇️ php 버전 확인 명령어
php -v
터미널에서 php 버전을 확인한다.
나는 php 8.2.12 버전이라 php 8.2 그리고
ZTS(Thread Safe 버전)이라 PHP 8.2 TS VS16 (64 bit)을 다운로드 했다.
NTS라면 PHP 8.2 VS16 (64 bit)을 다운로드하면 된다.
Xdebug: Downloads
Downloads Please refer to the installation instructions on how to install Xdebug. Source Xdebug is hosted in GIT. The source code can be browsed through github and can be checked out with: git clone https://github.com/xdebug/xdebug.git Latest Release Xdebu
xdebug.org
2. File Path
⬇️ 다운로드 받은 파일을 아래 경로에 위치
C:\xampp\php\ext
다운로드 받은 파일(php_xdebug-3.4.2-8.2-ts-vs16-x86_64.dll)을 위 경로에 넣어준다.
3. Update php.ini
⬇️ php.ini 파일 위치
C:\xampp\php
위 경로에서 php.ini 파일을 열고 파일 제일 밑에 아래 내용을 추가한다.
(검색해서 아래 내용이 이미 있다면 주석해제하고 수정하면 됨)
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug-3.4.2-8.2-ts-vs16-x86_64.dll"
xdebug.mode = debug,develop,trace,profile
xdebug.start_with_request = yes
xdebug.client_host = localhost
xdebug.client_port = 9003
xdebug.output_dir = "C:\xampp\tmp"
zend_extension, xdebug.output_dir는 본인 파일 이름이나 위치가 맞도록 확인한다.
4. Finish
php -v으로 Xdebug가 설치되었는지 확인한다.
제대로 설치되었으면 with Xdebug가 함께 나온다.