XDebug and RESTful server using PHPStorm or POSTman

How can I get a REST client (for example, built-in to PHPStorm or POSTman ) to work with XDebug?

In my current XDebug setup, using PHPStorm and the bookmark provided , I can make it work in both Chrome and Firefox - but as soon as I try with POSTman or any other REST client, I can’t figure out how to start it.

Greetings.

+54
rest phpstorm xdebug
Oct 02 '13 at 14:46
source share
3 answers

Until there is http://youtrack.jetbrains.com/issue/WI-17031 , you can try one of the following methods:

  • Configure xdebug (by editing php.ini) to try to debug each php script ( xdebug.remote_autostart = 1 )

  • Add the xdebug session start parameter to the actual URL ( XDEBUG_SESSION_START={{KEY}} - http://xdebug.org/docs/remote ), for example ?XDEBUG_SESSION_START=PHPSTORM

  • Pass the xdebug cookie as one of the headers (the one that has the bookmarklet or browser extension installed, for example)

To do this, make sure that the “phone grip” icon is activated ( Run | Start Listen for PHP Debug Connection ) in advance.

+118
02 Oct '13 at
source share

It drove me crazy. I just upgraded to PHP 7.1 and xdebug, which worked no longer worked. I updated the xdebug.so file (Linux) and php --version , indicating that xdebug really loads and works. But when I use Postman, the debugger never kicked.

Here is the solution. If you use Apache as your server, you need to enable PHP 7.1 motives and restart Apache: sudo service apache2 restart

+2
Jan 07 '17 at 1:10
source share

https://github.com/tacnoman/dephpugger This lib launches a debugger in the terminal (e.g. ipdb for Python and Byebug for Ruby). Very easy to use, and there is an example of how to run php cli scripts and a web server.

-2
Mar 12 '17 at 17:29
source share



All Articles