1. 下载php https://windows.php.net/downloads/releases/archives/
  2. 解压,复制php.ini-development重命名为php.ini
  3. 修改extension_dir="H:\phpstudy_pro\Extensions\php\php7.4.20nts\ext"
  4. 开启拓展

    extension=bz2
    extension=curl
    ;extension=ffi
    ;extension=ftp
    extension=fileinfo
    extension=gd2
    extension=gettext
    ;extension=gmp
    ;extension=intl
    extension=imap
    ;extension=ldap
    extension=mbstring
    ;extension=exif      ; Must be after mbstring as it depends on it
    extension=mysqli
    ;extension=oci8_12c  ; Use with Oracle Database 12c Instant Client
    ;extension=odbc
    extension=openssl
    ;extension=pdo_firebird
    extension=pdo_mysql
    ;extension=pdo_oci
    ;extension=pdo_odbc
    ;extension=pdo_pgsql
    ;extension=pdo_sqlite
    ;extension=pgsql
    ;extension=shmop
  5. 新增

    max_input_vars=3000
    error_log=H:/phpstudy_pro/Extensions/php/php7.4.20nts.log
  6. 切换版本,重启nginx
  7. 打开https://xdebug.org/wizard,将phpinfo()内容全选复制粘贴,点击按钮
  8. 根据介绍操作

    1. Download php_xdebug-3.1.6-7.4-vc15-nts-x86_64.dll
    2. Move the downloaded file to H:\phpstudy_pro\Extensions\php\php7.4.20nts\ext, and rename it to php_xdebug.dll
    3. Update H:\phpstudy_pro\Extensions\php\php7.4.20nts\php.ini and add the line:
      zend_extension = xdebug
    4. Restart the webserver
  9. 新增如下内容,自己修改

    [Xdebug]
    zend_extension=H:/phpstudy_pro/Extensions/php/php7.4.20nts/ext/php_xdebug.dll
    xdebug.collect_params=1
    xdebug.collect_return=1
    xdebug.auto_trace=On
    xdebug.trace_output_dir=H:/phpstudy_pro/Extensions/php_log/php7.4.20nts.xdebug.trace
    xdebug.profiler_enable=On
    xdebug.profiler_output_dir="H:\phpstudy_pro\Extensions\tmp\xdebug"
    xdebug.remote_enable=On
    xdebug.remote_host=localhost
    xdebug.remote_port=9003
    xdebug.remote_handler=dbgp
    xdebug.remote_enable=On
    xdebug.idekey=PHPSTORM
    xdebug.start_with_request=yes
    xdebug.mode=debug
    xdebug.discover_client_host=On
  10. webstrom 设置-php-调试-dbgp

    ide键PHPSTORM

    主机localhost

    端口9003