-
Notifications
You must be signed in to change notification settings - Fork 372
[ xdebug ] Add --experimental-unsafe-ide-integration option in PHP.wasm CLI
#2947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
bfe7f30 to
2235e13
Compare
|
@adamziel I created a new package named |
| }); | ||
|
|
||
| it('should not duplicate configuration if it already exists', () => { | ||
| const json = '{\n "configurations": []\n}'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tangential and unrelated to this PR, but a test where json is just {} would be useful. Similarly, a test where it's an unexpected value such as "" or {}
| "author": "The WordPress contributors", | ||
| "contributors": [ | ||
| { | ||
| "name": "Adam Zielinski", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're long past the point where it's just me. Let's just remove the contributors key entirely, "author" will do.
| @@ -0,0 +1,46 @@ | |||
| { | |||
| "name": "@php-wasm/cli-util", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick:
| "name": "@php-wasm/cli-util", | |
| "name": "@php-wasm/cli-utils", |
adamziel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left a few nitpicks but it's solid otherwise. Feel free to merge after addressing them. Thank you! ❤️
Motivation for the change, related issues
Based on issue #2763 and following pull request #2777
This pull request generates the IDE configuration files inside the developer's IDE.
Implementation details
It first clears all the configs named
PHP.wasm CLI - Listen for Xdebugin VSCode and PHPStorm config files.If
--xdebugand--experimental-unsafe-ide-integrationoptions are present, we add IDE configs in the related configs.PHPStorm : it adds a new
serverwith namePHP.wasm CLI - Listen for Xdebugin.idea/workspace.xml.VSCode : it adds a new
configurationwith namePHP.wasm CLI - Listen for Xdebugin.vscode/launch.json.Correction of an error in Playground CLI console.logs.
Creation of a new distinct package named
@php-wasm/cli-utilwhich is integrated into PHP.wasm CLI and Playground CLI with thexdebug-path-mappings.Next steps are reported in the Xdebug Follow-up issue.
Testing Instructions (or ideally a Blueprint)
CI
🧪 test-php-wasm-cli-util
cc @fellyph