DEV Community

loading...

Trigger PHP XDebug from postman

dechamp profile image DeChamp ・1 min read

You can easily trigger xdebug to run for PHP, when using postman. You just need to simply add XDEBUG_SESSION_START=PHPSTORM to the your url query params.

Of course you'll need to swap out PHPSTORM for your specific trigger key if it differs.

Discussion

pic
Editor guide
Collapse
zobo profile image
Damjan Cvetko

Since in Postman you control everything about requests, you can also do it with the cookie. In that case the name of the cookie is XDEBUG_SESSION. It also accepts POST. See the source here:

github.com/xdebug/xdebug/blob/70cb...

Collapse
dechamp profile image
DeChamp Author

Yup! That is a great add-on. Thank you.

Collapse
sergey_telpuk profile image
Sergey Telpuk

It's a first link at google searching). It'd better show how to set up environment docker+php+xdebug and clients phpstorm, postman and others.
I'm planning to write such an article.

Collapse
dechamp profile image
DeChamp Author

Mine is a first link? Well I guess I better add that then.

Collapse
sergey_telpuk profile image
Sergey Telpuk

Yeap, it is the first link. Will be waiting for it.