Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also map to xdebug backend if XDEBUG_SESSION is passed via query parameters #100

Open
hnsr opened this issue Apr 8, 2022 · 1 comment
Open
Assignees

Comments

@hnsr
Copy link
Contributor

hnsr commented Apr 8, 2022

Currently we automatically map to the xdebug backend based on the XDEBUG_SESSION cookie being set, but not via the query parameter that xdebug also supports as activation trigger (https://xdebug.org/docs/step_debug#manual-init)

Supporting query parameter activation would make debugging things like GraphQL calls (or any API calls) a lot easier

Currently we map based on $cookie_* in our nginx config: https://github.com/ho-nl/docker-development-box/blob/master/nginx/conf.d/default.conf#L2-L5

Changing this to $query is trivial, but we need to combine the two somehow to support both activation mechanisms

@hnsr hnsr self-assigned this Apr 8, 2022
@hnsr
Copy link
Contributor Author

hnsr commented Apr 8, 2022

Regarding using cookies for debugging graphql calls:

Ben er nog wat verder ingedoken, maar de reden dat zo'n xdebug cookie instellen via een webbased GraphQL IDE zo lastig is komt door https://stackoverflow.com/a/12867391
Ik heb geprobeerd dit alsnog mogelijk te maken door de request.includeCredentials instelling (zie graphql/graphql-playground#791 (comment)) die GraphQL Playground heeft i.c.m. met deze M2 CORS module: https://github.com/graycoreio/magento2-cors/blob/master/docs/stories/configuring-the-headers.md (met de juiste config rondom allowed headers en allowed credentials), maar het werkt alsnog niet..
Dus ik denk dat meegeven via query param en een extra stukje config toevoegen aan https://github.com/ho-nl/docker-development-box/blob/master/nginx/conf.d/default.conf de beste manier is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant