Skip to content

[CLI] Fix incorrect Xdebug mappings for absolute host paths#2860

Merged
brandonpayton merged 3 commits intotrunkfrom
xdebug-ide-integration/make-child-paths-relative
Nov 4, 2025
Merged

[CLI] Fix incorrect Xdebug mappings for absolute host paths#2860
brandonpayton merged 3 commits intotrunkfrom
xdebug-ide-integration/make-child-paths-relative

Conversation

@brandonpayton
Copy link
Member

Motivation for the change, related issues

When auto-mounting a plugin dir and using Xdebug IDE integration, I am seeing the following incorrect path mappings for a local project dir of /Users/brandon/src/test-plugin:

  • VSCode: "/wordpress/wp-content/plugins/test-plugin": "${workspaceFolder}//Users/brandon/src/test-plugin"
  • PhpStorm: <mapping local-root="$PROJECT_DIR$//Users/brandon/src/test-plugin" remote-root="/wordpress/wp-content/plugins/test-plugin"></mapping>

Implementation details

This PR fixes such paths so they are mapped like:

  • VSCode: "/wordpress/wp-content/plugins/test-plugin": "${workspaceFolder}/"
  • PhpStorm: <mapping local-root="$PROJECT_DIR$/" remote-root="/wordpress/wp-content/plugins/test-plugin"></mapping>

I also added two new tests cases for this.

Testing Instructions (or ideally a Blueprint)

  • CI

@brandonpayton brandonpayton requested a review from a team November 4, 2025 00:56
@brandonpayton
Copy link
Member Author

Looks like this change broke in Windows. I'm so thankful for those tests.

OK, will examine and fix.

@brandonpayton
Copy link
Member Author

This looks good to go. It's blocking some basic uses of the Xdebug IDE integration as I am trying to make a short video of using the feature, so I'm going to merge now and release new packages.

@brandonpayton brandonpayton merged commit cd410eb into trunk Nov 4, 2025
29 checks passed
@brandonpayton brandonpayton deleted the xdebug-ide-integration/make-child-paths-relative branch November 4, 2025 03:45
@mho22 mho22 mentioned this pull request Nov 7, 2025
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments