-
Notifications
You must be signed in to change notification settings - Fork 499
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
Implement LogOutputWindow for Logging #5065
Conversation
@andyleejordan I think you'll like this new utility function too for taking action on a config change: vscode-powershell/src/utils.ts Lines 89 to 113 in d617194
EDIT: I see a flaw here, will fix :) |
9471227
to
69e3209
Compare
Currently pending microsoft/vscode-languageserver-node#1116 otherwise all of our log messages surface as "trace" with a header which is not ideal. |
This is going to be so nice though. |
No longer pending that, I wrote a new trace handler :). Currently debating if I want to add realtime logging changes based on changing the LSP setting to this PR or save that for another one. |
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.
Love it, yay.
} | ||
} | ||
|
||
private registerCommands(): void { | ||
this.registeredCommands = [ | ||
vscode.commands.registerCommand("PowerShell.RestartSession", async () => { await this.restartSession(); }), | ||
vscode.commands.registerCommand(this.ShowSessionMenuCommandName, async () => { await this.showSessionMenu(); }), | ||
vscode.workspace.onDidChangeConfiguration(async () => { await this.onConfigurationUpdated(); }), | ||
vscode.workspace.onDidChangeConfiguration((e) => this.restartOnCriticalConfigChange(e)), |
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.
Ok nice that there's more information now.
… Thanks Copilot...
…ervices from options definitions
6d6f23c
to
79954e2
Compare
Implements the
LogOutputWindow
vscode API for PowerShell extension and PSES logs received via LSP.Recording.2024-10-18.170017.mp4
There will now be 3 separate log output panels:
PowerShell
Messages logged for the PowerShell client and messages sent via the LSP adapter (prepended with [PSES])PowerShell: Trace LSP
Traces the LSP messages back and forth. Omnisharp messages will show up as traces herePowerShell: Trace DAP
Traces the DAP messages back and forth (already implemented)This has several benefits:
Issue Reporter
, there's a contribution API for issue reporter where we can gather additional data as well (PR forthcoming)Log windows do not appear unless enabled.
Right now the Log Verbosity with "Set Log Level" only controls the client-side logging level, but I hope in a future PR to be able to update the logging level of PSES dynamically. Has a minor LSP performance benefit but difficult to implement due to MEL not having dynamic log level change support natively, but I think I found a way with IOptionsMonitor to do it.
Should be merged with PowerShell/PowerShellEditorServices#2200
Fixes #5079