Skip to content

Instantly share code, notes, and snippets.

@Tjoosten
Forked from funkatron/gist:6809c147256601b283a5
Last active August 29, 2015 14:22
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 Tjoosten/81cfa7eed20ce6cde6d6 to your computer and use it in GitHub Desktop.
Save Tjoosten/81cfa7eed20ce6cde6d6 to your computer and use it in GitHub Desktop.

Stuff I did to debug during API dev on my local machine

Run the PHP dev server on your given port

php -S 0.0.0.0:8080 -t public public/index.php

In httpie, pass ?XDEBUG_SESSION_START=foobar on the query string with the request

http -v POST 0.0.0.0:8080/ XDEBUG_SESSION_START==foobar

XDebug ini settings

xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000

Hit the "Start Listening for PHP Debug connections" icon in PHPStorm

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