Yii2 Day 2: 配置PHPStorm
XDebug 配置 Yii2那么多的代码,难免需要跟踪调试的地方,因此XDebug必不可少。因为XAMPP已经带着xdebu扩展,所以只需要更改下php.ini文件,就可以启用这个扩展啦: <!-- lang: php --> zend_extension = "D:\xampp\php\ext\php_xdebug.dll"(根据实际情况确定) xdebug.remote_enable =1 xdebug.remote_handler = "dbgp" xdebug.remote_host = "localhost" xdebug.remote_mode = "req" xdebug.remote_port = 9000 启用扩展后,可以用phpinfo看看,是不是有这个扩展啦。有了之后,就保证可以让php的调试信息发到remote_host的remote_port端口啦。接下去配置PHPStorm: 进入File>Settings>PHP>Servers,这里要填写服务器端的相关信息: name: localhost, host: localhost, port: 80, debugger: XDebug 进入File>Settings>PHP>Debug,找到XDebug选项卡,port填9000 进入File>Settings>PHP>Debug>DBGp Proxy 填写