[MOOSE-190]: Add shared debug settings#351
Open
MlKilderkin wants to merge 3 commits intomainfrom
Open
Conversation
dpellenwood
reviewed
May 4, 2026
Collaborator
dpellenwood
left a comment
There was a problem hiding this comment.
@MlKilderkin , thanks for doing this. I think we should keep the simple VS Code config, but leave instructions for PHPStorm instead. Thoughts?
Comment on lines
+2
to
+11
| /** | ||
| * Inject or replace the PhpStorm PhpServers block in .idea/workspace.xml. | ||
| * Intended for Docker/Xdebug path mappings (e.g. $PROJECT_DIR$ -> /app). | ||
| * | ||
| * Run manually: composer run phpstorm-workspace-php-debug | ||
| * | ||
| * If workspace.xml already contains a different PhpServers block, asks for | ||
| * confirmation before overwriting. Non-interactive runs must set: | ||
| * PHPSTORM_PHP_DEBUG_OVERWRITE=1 | ||
| */ |
Collaborator
There was a problem hiding this comment.
It's a shame that the debug mappings can't be added via a shared config. I appreciate you going deep to try and automate this. But, I think this is more effort than it's worth. We can leave the documentation and a Loom demo link for how to configure PHPStorm for xDebug rather than a complex script of this nature. Imho, this is too brittle/complex to be worth keeping.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this do/fix?
composer run phpstorm-workspace-php-debug→php ./dev/scripts/inject-phpstorm-php-debug-workspace.phpto inject/replace the PhpStorm PhpServers block in.idea/workspace.xml(PHP-only; no Python). Prompts before overwriting a different block; supportsPHPSTORM_PHP_DEBUG_OVERWRITE=1when stdin is not a TTY.composer run sync-vscode-launch→ copiesdev/configs/.vscode/launch.jsonto.vscode/launch.jsonand creates.vscodeif missing (overwrites an existinglaunch.json).docs/development-tools.mdwith both commands, overwrite warnings, and the PHP Debug (xdebug.php-debug) requirement for VS CodeNote: There is no direct way to export PHPStorm settings for debug only. All PHP Debug servers info are stored in .idea/workspace.xml alongside other user settings
This information won't work. It refers to specific debug configuration templates like running PHPUnit tests or similar
Due to that a new command
phpstorm-workspace-php-debugis introducedQA
Links to relevant issues