Skip to content

Conversation

@mho22
Copy link
Collaborator

@mho22 mho22 commented Nov 26, 2025

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 Xdebug in VSCode and PHPStorm config files.

  • If --xdebug and --experimental-unsafe-ide-integration options are present, we add IDE configs in the related configs.

  • PHPStorm : it adds a new server with name PHP.wasm CLI - Listen for Xdebug in .idea/workspace.xml.

  • VSCode : it adds a new configuration with name PHP.wasm CLI - Listen for Xdebug in .vscode/launch.json.

  • Correction of an error in Playground CLI console.logs.

Next steps are reported in the Xdebug Follow-up issue.

Testing Instructions (or ideally a Blueprint)

CI

🧪 test-php-wasm-cli

cc @fellyph

} from 'fast-xml-parser';
import * as JSONC from 'jsonc-parser';

export type IDEConfig = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's find a way to reuse it between the two CLI packages.

Copy link
Collaborator Author

@mho22 mho22 Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok! I don't know where it should be the best but I suppose it has to be out of php-wasm and playground directories? meta maybe? Something like meta/ides?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about creating a new npm package called php-wasm/cli-utils? It would help us avoid importing non-packaged code while also not adding more dependencies to php-wasm/node.

Copy link
Collaborator Author

@mho22 mho22 Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already a util directory in php-wasm so to keep consistency what do you think of php-wasm/cli-util without the s ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants