<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                一. 下載xdebug擴展 ? ? ? ?http://xdebug.org/download.php 二. php.ini配置 ? ? ? ?;基本調試配置 xdebug.auto\_trace = on xdebug.collect\_params = on xdebug.collect\_return = on xdebug.profiler\_enable = on xdebug.profiler\_output\_dir="D:\\phpStudy\\tmp\\xdebug" ? ? ? ? xdebug.trace\_output\_dir="D:\\phpStudy\\tmp\\xdebug" ;遠程調試設置 ? ? ? ? ?xdebug.remote\_enable = on ? ? ? ? ?xdebug.remote\_host = localhost ? ? ? ? ?xdebug.remote\_port = 9000 ? ? ? ? ?xdebug.remote\_autostart = on ? ? ? ? ?xdebug.default\_enable=on ?xdebug.remote\_autostart = on ? ? ? ?xdebug.remote\_connect\_back = On? ? ? ? ? ?//如果開啟此,將忽略下面的 xdebug.remote\_host 的參數。 ? ? ? ? ? xdebug.remote\_host = 192.168.59.104? ? //注意這里是,客戶端的ip ? ? ? ? ? xdebug.remote\_port = 9900? ? ? ? ? ? ? ? ? ? ? ?//? ? ? 注意這里是,客戶端的端口 ? ? ? ? 配置說明如下: ;顯示默認的錯誤信息 xdebug.auto\_trace=on ;自動打開“監測函數調用過程”的功模。該功能可以在你指定的目錄中將函數調用的監測信息以文件的形式輸出。此配置? ? ? ? ? ? ?項的默認值為off。 xdebug.collect\_params=on ;打開收集“函數參數”的功能。將函數調用的參數值列入函數過程調用的監測信息中。此配置項的默認值為off。 xdebug.collect\_return=on ;打開收集“函數返回值”的功能。將函數的返回值列入函數過程調用的監測信息中。此配置項的默認值為off。 xdebug.max\_nesting\_level=100 xdebug.profiler\_enable=on ;打開效能監測器。 xdebug.remote\_enable=on ;是否調試 xdebug.remote\_host=localhost xdebug.remote\_port=9000 ;調試端口 xdebug.remote\_handler=dbgp ;選擇協議 xdebug.trace\_output\_dir="d:\\Temp" ;設定函數調用監測信息的輸出文件的路徑。 xdebug.profiler\_output\_dir="d:\\Temp" ;設定效能監測信息輸出文件的路徑。 ? ? ? ?xdebug.auto\_trace = 1   ;是否允許Xdebug跟蹤函數調用,跟蹤信息以文件形式存儲,默認值為0 ? ? ? ?collect\_params = 1   ;是否允許Xdebug跟蹤函數參數,默認值為0   xdebug.collect\_return = 1   ;是否允許Xdebug跟蹤函數返回值,默認值為0   xdebug.profiler\_enable = 1   ;打開xdebug的性能分析器,以文件形式存儲,這項配置是不能以ini\_set()函數配置的,默認值為0   xdebug.profiler\_output\_dir ? ? ? ?;性能分析文件的存放位置,默認值為/tmp ? ? ? ?xdebug.profiler\_output\_name ? ? ? ?;性能分析文件的命名規則,默認值為cachegrind.out.%p ? ? ? ?xdebug.trace\_output\_dir ? ? ? ?;函數調用跟蹤信息輸出文件目錄,默認值為/tmp ? ? ? ?xdebug.trace\_output\_name ? ? ? ?;函數調用跟蹤信息輸出文件命名規則,默認為trace.%c 三. phpstorm配置 1\. 配置php執行php.exe ? ? ?![](https://www.freesion.com/images/90/79ed5edd027dedb7dfa1420269335d72.png) 2.? 9000端口與php.ini中xdebug.remote\_port=9000一致 ![](https://www.freesion.com/images/496/9aba82f7ee17a5b7d671b4d93e4e0948.png) 3.? ![](https://www.freesion.com/images/617/ca919fc3752fd4fdbd04b1e6907ea5d9.png) ![](https://www.freesion.com/images/647/2f20ef940cd2cdf9c8a19f36bf448257.png) ![](https://www.freesion.com/images/112/f847d2608ece7e24cd2a48d870009d80.png) ![](https://www.freesion.com/images/994/bd59c9c0bf907db764b6595707677f32.png) ![](https://www.freesion.com/images/131/baa018aea08d0bc28623669065be716b.png) ![](https://www.freesion.com/images/33/068dd0943d2ef2da0b087bbed336abe1.png) 四.xdebug調試 五. 性能分析 ? 1. 腳本執行時間 ? ? ? ? ? php自帶:microtime? ~~~php <?php/*** Simple function to replicate PHP 5 behaviour*/function microtime_float(){ list($usec, $sec) = explode(" ", microtime());return ((float)$usec + (float)$sec);}$time_start = microtime_float();// Sleep for a whileusleep(100);$time_end = microtime_float();$time = $time_end - $time_start;echo "Did nothing in $time seconds\n"; ~~~ ? ? ? ? ?xdebug:?xdebug\_time\_index() ? 2. 腳本運行占用內存 ? ? ? ? ? php自帶:memory\_get\_usage(),?PHP編譯時使用了\-enable-memory-limit參數時才有效 xdebug:?xdebug\_memory\_usage() ? 3. 檢測代碼不足,性能分析 ? ? ? ? a. php.ini 中加入配置如下 ? ? ? ? ? ? ?\[Xdebug\] ? ? ? ? ? ? ? ? ? ? ? xdebug.profiler\_enable=on ? ? ? ? ? ? ? ? ? ? ? xdebug.trace\_output\_dir="I:\\Projects\\xdebug" ? ? ? ? ? ? ? ? ? ? ? xdebug.profiler\_output\_dir="I:\\Projects\\xdebug" ? ? ? ? ?b.?執行情況的分析文件寫入到”../Projects/xdebug”目錄中 ? ? ? ? ?c. windows?安裝wincachegrind? ??https://sourceforge.net/projects/wincachegrind/?source=typ\_redirect d.linux 安裝webgrind?? ? ?e.參考:http://www.linuxeye.com/Linux/2913.html ? ? ? ? ?https://blog.csdn.net/Alex\_Best/article/details/6003784 六.?注意事項 1、避免生產環境開啟profiler和trace,只需開啟遠程調試; 2、盡量使用xdebug.profiler\_enable\_trigger替代xdebug.profiler\_enable; 3、如果使用webgrind分析profiler,建議不要放入生產環境,因為其沒有安全限制,任何人都可以訪問; 4、Xdebug的功能雖然強大,但是要均衡性能開銷; 七. 相關資料 ?https://confluence.jetbrains.com/display/PhpStorm/Debugging+PHP+Web+Applications+with+Run+Debug+Configurations https://xdebug.org/docs/remote ? ssh -R 9001:localhost:9001mox@120.92.142.115
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看