Skip to content

fix(vscode): stderr logs not written to output#926

Merged
9aoy merged 3 commits intomainfrom
fix/vscode-stderr-logs
Feb 2, 2026
Merged

fix(vscode): stderr logs not written to output#926
9aoy merged 3 commits intomainfrom
fix/vscode-stderr-logs

Conversation

@claneo
Copy link
Copy Markdown
Collaborator

@claneo claneo commented Jan 30, 2026

Summary

Added themergeStderrToStdout option to merge stderr output into stdout, addressing the limitation that VSCode’sappendOutput supports only a single output stream.

This also fixes the issue where running a single test was being skipped, caused by #916, which changed the delimiter from two spaces to one space.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @claneo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request improves the robustness of the VSCode extension by ensuring that all test output, including stderr, is correctly captured and displayed within the editor. It also rectifies a bug that previously prevented the execution of single test cases, enhancing the overall developer experience for test debugging and execution.

Highlights

  • Stderr Redirection for VSCode: Introduced a mergeStderrToStdout option in the core WindowRenderer to redirect stderr output to stdout, specifically addressing VSCode's limitation of handling only one output stream.
  • Single Test Run Fix: Corrected the test name pattern matching in the VSCode extension by changing the delimiter from two spaces to one, resolving an issue where running individual tests was skipped.
  • Enhanced Test Coverage: Added new test cases and assertions to validate both the stderr output redirection and the fix for running single test cases.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a mergeStderrToStdout option to redirect stderr to stdout, which is particularly useful for VSCode integration. It also fixes a bug where single test cases were skipped due to an incorrect delimiter in the test name pattern. The changes are well-implemented and include corresponding tests to verify both the new feature and the bug fix. I've left one comment regarding code duplication in the new test suite, suggesting a refactoring to improve maintainability.

@claneo claneo marked this pull request as ready for review January 30, 2026 13:54
Copilot AI review requested due to automatic review settings January 30, 2026 13:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes missing stderr output in the VS Code Test Runner output (by allowing stderr to be merged into stdout for VS Code’s single-stream appendOutput), and restores the ability to run a single test case by correcting the test-name delimiter used when building testNamePattern.

Changes:

  • Add mergeStderrToStdout support to the core windowed renderer and enable it in the VS Code worker logger.
  • Fix single-test execution by switching the delimiter in testNamePattern construction from double-space to single-space.
  • Extend VS Code integration tests/fixtures to validate stderr forwarding and single-test execution.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/vscode/src/worker/reporter.ts Enables stderr→stdout merging for VS Code’s logger.
packages/core/src/reporter/windowedRenderer.ts Adds mergeStderrToStdout option and routes intercepted process.stderr accordingly.
packages/vscode/src/master.ts Fixes testNamePattern delimiter to correctly match full test names.
packages/vscode/tests/suite/progress.test.ts Adds regression tests for stderr capture and running a single test case.
packages/vscode/tests/fixtures/workspace-1/test/progress.test.ts Emits stdout/stderr to validate forwarding behavior.
packages/vscode/tests/fixtures/fixtures.code-workspace Workspace fixture formatting update.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@9aoy 9aoy merged commit 1ea85bc into main Feb 2, 2026
9 checks passed
@9aoy 9aoy deleted the fix/vscode-stderr-logs branch February 2, 2026 03:05
@9aoy
Copy link
Copy Markdown
Collaborator

9aoy commented Feb 2, 2026

👍

@fi3ework fi3ework mentioned this pull request Feb 3, 2026
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