Skip to content

Change xdebug trigger method to improve performance #1230

Open
@danstaver

Description

@danstaver

Description
Today, you have to manually enable/disable xdebug, which is taking time, and sometime the user can forget to enable it and wonders why the breakpoint didnt trigger, or, you have the option to always have it enabled, which is negatively affecting performance in local.

It would be great if we could have the same logic in place as what today adobe commerce cloud has, where, even in production i can trigger xdebug, without it affecting regular users
https://experienceleague.adobe.com/en/docs/commerce-cloud-service/user-guide/develop/test/debug#debug-for-pro-staging-and-production
image
What we could try to do, implement something similar to comment #2 from
magento/magento-cloud-docker#112 (comment)

Steps To Reproduce

  1. N/A

Expected Result

  • xdebug triggers only when XDEBUG_SESSION cookie present in request. This request is being sent to a separate process with loaded and configured xdebug extension
  • if XDEBUG_SESSION cookie not present, request is sent to a process which does not have xdebug loaded at all

Actual Result
xdebug is either enabled or disabled (but, even if enabled or disabled, the extension is still loaded)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions