PhpStrom + Firefox + xdebug + postmanデバッグ
Phpstrom Firefox Xdebug Postman Debugging
-
WindowsにXdebug拡張機能をインストールするには、対応するxdebug.dll拡張機能をダウンロードするだけです。
-
以下に示すように、独自のPHPバージョンを見つけてください。これがPHP7.2.8です。
-
-
ダウンロードリンク: https://xdebug.org/download.php
-
php.iniを構成し、サーバーを再起動します
[xdebug] Zend_extension='F:AppServphp5extphp_xdebug-2.4.1-5.6-vc11.dll' #Specify the absolute path of the Xdebug extension file Xdebug.auto_trace=on #Enable code automatic tracking Xdebug.collect_params=on #Allows collection of parameter variables passed to the function Xdebug.collect_return=on #Allows the return value of the collection function call Xdebug.trace_output_dir='F:AppServXdebug' #Specify the directory where the stack trace file is stored Xdebug.profiler_enable=on # Whether to enable Xdebug performance analysis and create performance information files Xdebug.profiler_output_dir='F:AppServXdebug' #Specify the output directory of the profiling information file Xdebug.remote_enable = on # Whether to enable remote debugging Xdebug.remote_handler = dbgp #Specify the processing protocol for remote debugging Xdebug.remote_host= localhost #Specify the host name for remote debugging Xdebug.remote_port = 9000 #Specify the port number for remote debugging Xdebug.idekey = PHPSTORM #Specify the IDE Key passed to the DBGp debugger handler
二 。 phpStormを開き、ショートカットClt + Alt + Sを開いて、設定検索Xdebugを開きます。
- phpStormが上部メニューバー-> PHPでphpバージョンを自動的に認識しない場合は、手動で追加します
2. [設定]> [PHP]> [デバッグ]> [DBGpプロキシ]に移動し、PHPSTORMにIDEキーを入力し、ローカルホストにホストを入力し、9000にポートを入力します
3. [設定]> [PHP]> [サーバー]に移動します。ここでは、サーバー側の関連情報を入力する必要があります。たとえば、name fill localhost、host fill localhost、port fill 80、debugger selectXDebugなどです。
3。 Firefoxインストール拡張機能Xdebugを開きます
ここでポイントテストを破ることができます
XDEBUG_SESSION = PHPSTORMをpostmanリクエストのCOOKIEに追加して、phpstromのデバッグ機能を調整します。
ヘッダーにキーを追加します。 クッキー 、値: XDEBUG_SESSION = PHPSTORM