f0rtis
f0rtis

Reputation: 326

Debug rest in PhpStorm

A new functional in new PhpStorm 11 is debug rest api within build-in rest api tool. I setup debugger and all works from browser - application stops on breakpoints. enter image description here

But when i run debug from rest api tool, my breakpoints be ignored. enter image description here

What i missed? On jetbrains blog said: "To use the debugger, just make sure Xdebug is configured and enabled. Now you can use the new “Submit request in debug mode” button to easily send the request and initiate the debugger."

Upvotes: 2

Views: 1661

Answers (2)

wtk13
wtk13

Reputation: 397

I had same problem as you.

Try to change Xdebug port. I changed it to 9001 and it works.

php.ini

[xdebug]
xdebug.remote_enable=on
xdebug.default_enable=on
xdebug.remote_autostart=on
xdebug.remote_port=9001
xdebug.remote_host=localhost
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_name=xdebug-profile-cachegrind.out-%H-%R
xdebug.var_display_max_children = 128
xdebug.var_display_max_data = 2048
xdebug.var_display_max_depth = 128

Storm

enter image description here

Upvotes: 0

webinvader
webinvader

Reputation: 21

If you want to trigger and xdebug session from PHPStorm’s REST client you can set the debug cookie manually. Add the following to a new Request header:

Name: Cookie
Value: XDEBUG_SESSION=PHPSTORM

Upvotes: 2

Related Questions