Enable Xdebug in Behat tests
まだ誰も着手していません。
評価
この issue はまだ評価されていません。
説明
Feature Request
- Yes, I reviewed the contribution guidelines.
Describe your use case and the problem you are facing
When working with the Behat tests, I'd like to be able to step debug the actual WP CLI + WordPress code which is being run.
Describe the solution you'd like
Add a WP CLI environmental variable to enable Xdebug, which would prepend any WP CLI commands run by Behat with Xdebug environmental variables to enable it.
WP_CLI_TEST_XDEBUG=true composer behat
In wp-cli/wp-cli/php/WP_CLI/Process.php:73 add:
if( getenv( 'WP_CLI_TEST_XDEBUG' ) ) {
$this->command = "XDEBUG_CONFIG=\"idekey=WP_CLI_TEST_XDEBUG remote_connect_back=1 log_level=0\" XDEBUG_MODE=debug $this->command";
}
Drawbacks:
Definitely slower. And I seem to have to click play often, but maybe that's just a PhpStorm setting I've got wrong.
Alternatives:
Edit every Behat feature to add XDEBUG_CONFIG="idekey=WP_CLI_XDEBUG remote_connect_back=1 log_level=0" XDEBUG_MODE=debug as needed.
I seem to need XDEBUG_SESSION=1 sometimes – I certainly did not need it when I opened the issue.
- 主要言語
- PHP
- スター
- 43
- フォーク
- 27
- 平均マージ
- 48分
- マージ済み PR(30日)
- 6
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
似ている issue
-
Solved site promotion gate fails on runner PHP patch drift (expects 8.2.33, runner installs 8.2.34) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Automattic/blocks-engine#2161 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Automattic/static-site-importer#1824 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
0. Needs triage bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
0. Needs triage 35-feedback bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100