-
-
Notifications
You must be signed in to change notification settings - Fork 107
Add setting to control inline console logs during test debugging #700
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
Conversation
…logs Co-authored-by: sheremet-va <16173870+sheremet-va@users.noreply.github.com>
Co-authored-by: sheremet-va <16173870+sheremet-va@users.noreply.github.com>
Co-authored-by: sheremet-va <16173870+sheremet-va@users.noreply.github.com>
package.json
Outdated
| "default": true, | ||
| "scope": "resource" | ||
| }, | ||
| "vitest.disableInlineConsoleLog": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot rename it to vitest.showInlineConsoleLog and set it to true by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to vitest.showInlineConsoleLog with default true. The logic has been inverted accordingly. (b54e1f6)
Co-authored-by: sheremet-va <16173870+sheremet-va@users.noreply.github.com>
sheremet-va
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot mention showInlineConsoleLog in README
Co-authored-by: sheremet-va <16173870+sheremet-va@users.noreply.github.com>
Implementation Complete: Add Setting to Control Inline Console Logs
Summary
Successfully implemented a new VSCode extension setting
vitest.showInlineConsoleLogthat allows users to control the inline display of console.log messages in the editor while debugging Vitest tests.Changes Made
1. Configuration Setting (package.json)
vitest.showInlineConsoleLog2. Configuration Reader (config.ts)
showInlineConsoleLogto config reader3. Test Runner (runner.ts)
showInlineConsoleLogproperty to TestRunner classonConsoleLoghandler to conditionally pass location:true(default): location is provided → inline displayfalse: location isundefined→ no inline display4. Documentation (README.md)
vitest.showInlineConsoleLogto the Configuration section5. Additional Improvements
.gitignoreto exclude*.tsbuildinfobuild artifactsscope: "resource"to existing settings (applyDiagnostic,showImportsDuration) for consistencyTechnical Details
How it works:
testRun.appendOutput()receives a location parameterlocation = undefinedwhen the setting is disabled, inline display is suppressedFeatures:
scope: "resource"Usage
Users can disable inline console logs when debugging:
{ "vitest.showInlineConsoleLog": false }Or via Settings UI: Search for "Vitest: Show Inline Console Log"
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.