Skip to content

Instantly share code, notes, and snippets.

@manashcse11
Last active September 15, 2022 05:55
Show Gist options
  • Save manashcse11/b4da2a91eb3521a0450b8f623d244030 to your computer and use it in GitHub Desktop.
Save manashcse11/b4da2a91eb3521a0450b8f623d244030 to your computer and use it in GitHub Desktop.
Configure xdebug with phpstorm

Browser based debuging

  • Install xdebug for debian: sudo apt-get install php-xdebug
  • Open php.ini to edit
    • Location for php artisan serve or built in server: /etc/php/8.1/cli

    • Location for apache: /etc/php/8.1/apache2

      [xdebug]
      zend_extension=xdebug.so
      xdebug.mode=debug
      xdebug.client_host=127.0.0.1
      xdebug.idekey=PHPSTORM

  • Phpstorm: In the Settings/Preferences dialog (Ctrl+Alt+S), click PHP.
  • Now set breakpoint & reload page in browser image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment