zoukankan      html  css  js  c++  java
  • laragon 之xdebug

    看上去默认没有安装调试工具。手工来吧。
    PHP调试是比较蛋痛的,需要关注并配置三个地方:IDE如我用的phpstorm,浏览器,和PHP服务端。

    浏览器chrom

    浏览器我用google chrom,安装个调试插件,每次使用要让那个小虫子发绿。

    PHP服务端php.ini

    PHP服务端主要是复制文件和配置php.ini. 下面细说一下。
    启动localhost/phpinfo.php页,复制所有内容,贴到这个页面中:

    https://xdebug.org/wizard.php
    这个小精灵,会教你设置的。大致类似这样:

    Download php_xdebug-2.6.0-7.2-vc15-x86_64.dll
    Move the downloaded file to D:laragoninphpphp-7.2.2-Win32-VC15-x64ext
    Update D:laragoninphpphp-7.2.2-Win32-VC15-x64php.ini and change the line
    zend_extension = D:laragoninphpphp-7.2.2-Win32-VC15-x64extphp_xdebug-2.6.0-7.2-vc15-x86_64.dll
    Restart the webserver
    

    php.ini还需要加入下面这些:

    xdebug.remote_enable=1
    xdebug.remote_connect_back=1
    xdebug.remote_port=9000
    xdebug.idekey="PHPSTORM"
    

    9000那个端口,要和PHPSTORM 中的设置一样。
    重启web服务后,在laragon中的php->Extensions中选中 xdebug那行。

    PHPSTORM设置

    在File -> setting ->Languages & frameworks -> PHP ->Valedate 在这里设置并校验一下就行了。如下图:

  • 相关阅读:
    bzoj4804
    bzoj2962
    bzoj4827
    bzoj2553
    bzoj3611
    BZOJ 1636: [Usaco2007 Jan]Balanced Lineup
    BZOJ 1635: [Usaco2007 Jan]Tallest Cow 最高的牛
    BZOJ 1634: [Usaco2007 Jan]Protecting the Flowers
    BZOJ 1631: [Usaco2007 Feb]Cow Party
    BZOJ 2582: [Usaco2012Jan]Bovine Alliance
  • 原文地址:https://www.cnblogs.com/dreamfine/p/9040547.html
Copyright © 2011-2022 走看看