Debug with Xdebug on the Commandline with Phpstorm and Git Bash

Enable Phpstorm Xdebug listening:

$ export XDEBUG_CONFIG="idekey=PHPSTORM"

Press the listen button inside Phpstorm to actually listen:


To disable Phpstorm Xdebug processing in Bash again:


This (PHPSTORM) is the default Phpstorm IDE-Key. You don’t need to disable listening after the variable is unset.

Should work with any other UNIXoide shell as well.

See as well:

This entry was posted in Hakre's Tips, PHP Development, Pressed and tagged , , , , . Bookmark the permalink.

1 Response to Debug with Xdebug on the Commandline with Phpstorm and Git Bash

  1. Thank you a lot, it works with my settings!

    Here are they:

    xdebug nginx + phpfpm + phpstorm

    1. Install Xdebug for php

    sudo apt-get install php5-xdebug

    2. Setup xdebug.ini for ubuntu

    cd /etc/php5/fpm/conf.d/
    sudo mv 20-xdebug.ini xdebug.ini

    Add follwing line in xdebug.ini


    3.Restart php5-fpm

    sudo service php5-fpm restart

    4. Configurate phpstorm

    Set Debugging Port : 9001

    P.S. do not forget to change default 9000 debug port to 9001 in IDE settings (Debugging)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.