Skip to content
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

Configure Xdebug port and override XDEBUG_MODE env #285

Open
zobo opened this issue Feb 18, 2025 · 0 comments
Open

Configure Xdebug port and override XDEBUG_MODE env #285

zobo opened this issue Feb 18, 2025 · 0 comments

Comments

@zobo
Copy link
Contributor

zobo commented Feb 18, 2025

Todo for myself.

When we Debug or Profile a test, the plugin instructs Xdebug to use xdebug_mode debug or profile. However since we allow the phpunit process to inherit the surounding environment, the XDEBUG_MODE that has preference over command line -d or .ini values can interfier with this process.
Should change so that:

  • ether set env XDEBUG_MODE instead of -d or,
  • leave -d and override XDEBUG_MODE with empty string

The second part is regarding which port Xdebug and php-debug extension should use. Ideally phpunit would run on a randomized port, so to not conflict with any other existing xdebug process. However since it's php-debug that is actually responsible for opening the port, a more complex 2-way communication between the two vscode extensions would be needed. An easy workaround would be to allow the user to set a specific TCP port that the two extensions should use to coordinate the DBGP session.

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

No branches or pull requests

2 participants