Skip to content

Instantly share code, notes, and snippets.

@cordoval
Forked from dhrrgn/VagrantXDebug.md
Created May 5, 2014 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cordoval/4d0fb6e3094e5a361d68 to your computer and use it in GitHub Desktop.
Save cordoval/4d0fb6e3094e5a361d68 to your computer and use it in GitHub Desktop.

Configure

xdebug.ini

xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
xdebug.idekey=vagrant     
xdebug.remote_host=10.0.2.2

The remote_host is the IDE's host ip from the vagrant box. 10.0.2.2 seems to be the default...i think, works for me.

In PHPStorm

Setup Server

Add Debug Configuration

Run > Edit Configurations...

Start Debugging

Run > Debug...

Run your command, then switch to PHPStorm

Profit!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment