PHPStorm + XDebug Setup Walkthrough

前端 未结 6 660
渐次进展
渐次进展 2020-11-30 19:58

Up until recently, I\'ve been writing code in PHP (via Notepad++) and debugging by checking the logs in IIS (gotta love that web-platform installer); I\'ve since decided to

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-30 20:36

    1. install xdebug on your local PHP - actually update your php v with xdebug included: https://floyk.com/en/post/how-to-update-php-version-on-your-macbook-macos-sierra

    2. setup your xdebug.ini

      zend_extension=/usr/local/php5/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so [xdebug] xdebug.remote_enable=on xdebug.default_enable=on xdebug.remote_autostart=off xdebug.remote_port=9000 xdebug.remote_host=localhost xdebug.profiler_enable_trigger=1 xdebug.profiler_output_name=xdebug-profile-cachegrind.out-%H-%R xdebug.var_display_max_children = 128 xdebug.var_display_max_data = 512 xdebug.var_display_max_depth = 3 xdebug.remote_enable = 1 xdebug.idekey = PHPSTORM xdebug.show_error_trace = 1 xdebug.file_link_format = phpstorm://open?%f:%l

    3. Install Xdebug helper to your Chrome browser: Install Xdebug helper

    4. in your PhpStorm go to Settings/Preferences->Languages & Frameworks->PHP->Debug

    • Update your Automatically detect IDE IP if needed, and press OK

    You are done.

    More detailed "step by step" guide you can find here:

    https://floyk.com/en/post/how-install-php-with-xdebug-on-mac-os

提交回复
热议问题