[wp-trac] [WordPress Trac] #62833: Pass the working directory path from the host to the dev environment containers
WordPress Trac
noreply at wordpress.org
Mon Jan 20 20:47:51 UTC 2025
#62833: Pass the working directory path from the host to the dev environment
containers
------------------------------+-----------------------------
Reporter: johnbillion | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version:
Severity: normal | Keywords:
Focuses: |
------------------------------+-----------------------------
A power feature of my Query Monitor plugin is
[https://querymonitor.com/help/clickable-stack-traces-and-function-names/
clickable stack traces]. It creates a link to open the file at the correct
path and line number in your code editor or IDE for file paths in stack
traces, errors, and other debugging output throughout the UI.
A path within a container needs to be mapped to the corresponding path on
the host. PhpStorm and VS Code both have mechanisms for specifying path
mapping, but it's specific to debug adaptors and doesn't work for their
URL protocol handlers (ie. `phpstorm://` and `vscode://`).
To facilitate zero-setup path mapping for clickable stack traces on the
WordPress local development environment, the host should send the current
working directory path to the container via an environment variable that
developer tools can read in order to map `ABSPATH` to the corresponding
path on the host. The development version of Query Monitor supports the
`HOST_PATH` environment variable for this.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62833>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list