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:

xdebug-listen-phpstorm

To disable Phpstorm Xdebug processing in Bash again:

$ unset XDEBUG_CONFIG

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:

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

One 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

    xdebug.profiler_output_dir=/home//Desktop/profile
    xdebug.profiler_enable_trigger=1
    xdebug.profiler_enable=0
    xdebug.remote_enable=true
    xdebug.remote_host=127.0.0.1
    xdebug.remote_port=9001
    xdebug.remote_handler=dbgp
    xdebug.remote_autostart=0

    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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s