Opened 13 months ago
Closed 13 months ago
#62833 closed enhancement (fixed)
Pass the working directory path from the host to the dev environment containers
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.8 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Build/Test Tools | Keywords: | has-patch |
| Focuses: | Cc: |
Description
A power feature of my Query Monitor plugin is 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.
In 59668: