開一個新空白專案
File => New Project => PHP Empty Project
用ConEmu64 + Git Bash 到剛剛開的PHP專案下拉取不同專案$ git clone git@github.com:kalecgos0616/project_index.git
$ git clone git@github.com:kalecgos0616/project_codes.git
配置SFTP
不同git不同目錄的code更新到伺服器不同路徑
C:\Users\PhpstormProjects\project_workspace\project_index => /var/www/html/project_index
C:\Users\PhpstormProjects\project_workspace\project_codes => /var/www/html/project_codes
配置XDebug
Open edit Run/Debug configurations dialog => Add New Configuration => PHP Remote Debug => 配置Server
Host 必須設 開發機上的vhost域名:example.com配置本地和遠程對應的路徑
如果還是不能斷點,在開發機上對本機測試XDebug 端口有沒有通
# telnet 192.168.1.7 9000
Trying 192.168.1.7...
telnet: connect to address 192.168.1.7: Connection timed out
沒有通要用 Windows - CentOS 遠端XDebug調試PHP 的 2. 打開Windows的port
結果
成功斷點