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

XDebug Toggle #33

Open
marshallthornton opened this issue Aug 23, 2023 · 2 comments
Open

XDebug Toggle #33

marshallthornton opened this issue Aug 23, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@marshallthornton
Copy link

Is your feature request related to a problem?

No

Describe the solution you'd like

An option that could be enabled in the plugin settings to add a toggle for sending the XDebug header on requests. Other REST clients tend to support this via plugins or settings so it would be nice if Jet Client did as well.

Additional context

Functionality-wise, it would just need to add a XDEBUG_SESSION cookie to the request it sends. The value for this cookie could also be something set inside the plugin settings so that it could be customized for each project if needed.

Having the toggle itself be a button or checkbox near the Send button to enable/disable including this cookie would make life a lot easier when working with PHP APIs.

@marshallthornton marshallthornton added the enhancement New feature or request label Aug 23, 2023
@AntonShuvaev
Copy link
Collaborator

Hi @marshallthornton,

I'm not familiar with XDebug, but if I understand correctly, you can use it by utilizing the cookies functionality of the plugin or the headers functionality. Headers of requests are inherited from parent folder headers, so you can manually add the XDEBUG_SESSION cookie to the desired request or root folder. This should allow you to achieve the behavior you described.

@marshallthornton
Copy link
Author

Yeah, it would just be a nice quality of life enhancement to have it be a toggle button to add/remove that cookie on the request itself.

Typically you don't want to always be sending that cookie since it slows down the actual execution of the code when remote debugging is turned on. So 90+% of the time it would be toggled off while just testing things during development and only enabled when I need to setup breakpoints and step through some code to debug an issue.

It isn't the end of the world to not have it since, like you said, I could just add the cookie manually. It would just be nice to have a quick and easy toggle to enable/disable it that could potentially only show up if you enable the option in plugin settings so other people who aren't working in PHP don't have to see it.

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

No branches or pull requests

2 participants