[Repo Assist] feat: add VS Code output channel for debug logging and error display#50
Draft
github-actions[bot] wants to merge 1 commit intomasterfrom
Conversation
Replace console.log/console.group calls with a named VS Code output
channel ('PHPCBF'). Benefits:
- Users can see debug output in 'View → Output → PHPCBF' without
opening Developer Tools (Help → Toggle Developer Tools → Console),
which addresses the many 'does nothing / no debug output' reports
on issues #8 and #21.
- The output channel auto-reveals when phpcbf encounters an error or
when debug mode is enabled, so problems surface immediately.
- stderr is now also captured to the output channel (was previously
logged to browser console only).
- The channel is registered with context.subscriptions so it is
disposed when the extension deactivates.
No behaviour changes for the formatter logic itself.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions bot
added a commit
that referenced
this pull request
Mar 9, 2026
Documents the bug fixes and improvements from the open Repo Assist PRs: - Fix formatter hang on exit code 0 (PR #49, closes #39) - Fix phpcbf.enable=false bypass (PR #56) - Fix temp file leak on process error (PR #58) - Fix onWillSaveTextDocument save timeout (PR #53, closes #35) - Fix deprecated fs.exists (PR #51, closes #36) - Fix undefined showErrorMessage on unknown exit code (PR #61) - Add VS Code output channel for debug/error display (PR #50) - Refactor getArgs standard variable (PR #60) - Fix eslintrc and no-case-declarations lint issues Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This is an automated PR from Repo Assist, an AI assistant.
Summary
Replaces
console.log/console.groupcalls with a named VS Code output channel (PHPCBF), directly addressing the longstanding user complaint in issues #8 and #21 where debug mode shows "nothing" and users don't know how to diagnose problems.Motivation
The most common question from users is "the extension does nothing, even with
phpcbf.debug: true— where is the output?" The answer has always been: "open Developer Tools (Help → Toggle Developer Tools → Console)". That's a hidden, developer-facing tool that most end users never find.With this change, debug output appears in the standard Output panel (
View → Output → PHPCBF), which is a first-class VS Code UI surface visible to all users.Changes
console.group("PHPCBF")+console.log(...)(only visible in Dev Tools)outputChannel.appendLine(...)(visible inView → Output → PHPCBF)context.subscriptionsSpecific changes in
extension.js:activate()createswindow.createOutputChannel("PHPCBF")and registers it withcontext.subscriptionsnew PHPCBF(outputChannel)getArgs(): outputs args to channel (wasconsole.group+console.log)format(): outputs timestamp + filename at start; exit code; stdout; stderr; done messageconsole.log)phpcbfErrorhandler: logs to channel and auto-reveals itTest Status
This extension requires a live VS Code instance. The changes are purely in the logging layer — no formatter logic was modified.
Manual verification steps:
"phpcbf.debug": truephpcbf.executablePathand save — the Output panel should reveal with the error messageRelated Issues
Addresses the long-standing "does nothing / no debug output" reports in #8 and #21.