Make WordPress Core

#62833 closed enhancement (fixed)

Pass the working directory path from the host to the dev environment containers

Reported by: johnbillion Owned by: johnbillion
Priority: normal Milestone: 6.8
Component: Build/Test Tools Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

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.

Change History (3)

This ticket was mentioned in ​PR #8149 on ​WordPress/wordpress-develop by ​@johnbillion.


22 months ago
#1

  • Keywords has-patch added

#2 @johnbillion
22 months ago

  • Milestone Awaiting Review → 6.8

#3 @johnbillion
22 months ago

  • Owner set to johnbillion
  • Resolution → fixed
  • Status new → closed

In 59668:

Build/Test Tools: Pass the working directory path from the host to the dev environment containers.

This allows development tools to read the host path information from the HOST_PATH environment variable in order to, for example, map a path in a stack trace from the path in the container to the path on the host machine.

Fixes #62833

Note: See TracTickets for help on using tickets.