由于vs code开源和跨平台,而且插件很多,所以打算以后编写和调试php都用vs code。
配置vs code+phpstudy的php调试环境步骤如下:
1、配置phpstudy,其他选项菜单->php扩展及设置->php扩展->勾选xdebug
image.png
2、然后修改php.ini,找到你对应php版本目录下的php.ini,将[XDebug]的内容进行修改,将zend_extension目录
修改为你的xdebug的dll的路径,如下所示
image
zend_extension = D:\phpstudy\PHPTutorial\php\php-5.4.45-nts\ext\php_xdebug.dll
;xdebug的dll文件路径
xdebug.remote_enable = 1
;是否开启远程调试
xdebug.remote_autostart = 1
;是否自动开启远程调试
xdebug.remote_port = 10001
;指定远程调试的端口号
xdebug.remote_handler = "dbgp"
;指定远程调试的处理协议
xdebug.remote_mode = "re