content/type with Debug Sela Yair Created July 26, 2018 09:37 is it possible to set when debuging using xdebug the content/type to application/json for example?
Hello,
Sorry, didn't get it. Where do you want to set that? Please describe a use case in more details (workflow, code samples),
Sorry about that.
Under Run in the menu, there is Debug. I configure everything in Edit Configuration: Under PHP HTTP Request.
Unfortunately that's not possible.
What would be the point of it? Could you tell more details about what you'd like to achieve please?
To debug API requests that expect application/json without changing the code that would support the IDE default.
Is there a different way to achieve it? or my code should handle also non application/json?
You can use the HTTP client for that: https://www.jetbrains.com/help/phpstorm/http-client-in-product-code-editor.html
To start a debugging session, just add the XDEBUG_SESSION_START parameter, like `?XDEBUG_SESSION_START=1`.
So for example using content-type header as follows
will still cause unintended output after intended ouput with built-in web server
by the phpstorm ide for some unsolved debugging reason?
Please open File | Settings (Preferences on Mac) | Tools | Web Browsers and Preview & disable both options via drop-down selector for "Reload behavior".
The JS part above comes from a live reload IDE component.