Skip to content

Commit f4ff933

Browse files
committed
docs: document testing.openTesting setting for auto-opening Test Results panel
1 parent 55ad38d commit f4ff933

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

packages/extension/README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,11 @@ Add to `.vscode/settings.json`. All settings use the `phpunit.*` prefix.
7777
// Clear debug output channel before each run (default: true)
7878
"phpunit.clearDebugOutputOnRun": true,
7979

80-
// Control when Test Results Panel opens (VS Code built-in setting):
81-
// "testing.openTesting": "openOnTestStart" | "openOnTestFailure" | "neverOpen"
80+
// Control when Test Results panel opens automatically (VS Code built-in setting):
81+
// - "openOnTestStart" — open as soon as a run starts
82+
// - "openOnTestFailure" — open only when a test fails (useful for seeing dd() output)
83+
// - "neverOpen" — never open automatically
84+
// "testing.openTesting": "openOnTestFailure"
8285

8386
// launch.json configuration name for debugging
8487
"phpunit.debuggerConfig": "",
@@ -327,6 +330,22 @@ Ensure your `phpunit.command` template quotes the variables (this is the default
327330
```
328331
</details>
329332

333+
<details>
334+
<summary>Test Results panel does not open automatically after a failure</summary>
335+
336+
By default VS Code does not automatically reveal the Test Results panel. To open it whenever a test fails (useful for inspecting `dd()` output or error messages):
337+
338+
```jsonc
339+
{
340+
"testing.openTesting": "openOnTestFailure"
341+
}
342+
```
343+
344+
Other values: `"openOnTestStart"` (open as soon as a run starts), `"neverOpen"` (never open automatically).
345+
346+
> **Note:** `dd()` output appears in the Test Results panel as raw output, since it causes the PHP process to exit before producing any structured test results.
347+
</details>
348+
330349
<details>
331350
<summary>Duplicate tests in multi-root workspace</summary>
332351

0 commit comments

Comments
 (0)