-
Notifications
You must be signed in to change notification settings - Fork 510
Improve PowerShell session management, status reporting, and logging #350
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
This is a pretty big change so I'll give @rkeithhill a chance to take a look before merging :) |
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.
Wow! You've been busy. From what I can tell, looking at all the changes, it looks good. Then again, my TypeScript/JavaScript Fu is weak compared to my C# Fu.
if (logLevel >= this.MinimumLogLevel) { | ||
// TODO: Add timestamp | ||
this.logChannel.appendLine(message); | ||
fs.appendFile(this.logFilePath, message + "\r\n"); |
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.
Should these line endings change to \n
for Linux and macOS?
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.
Hmm, yeah, good point. In fact, I need to verify that this all works correctly on Linux/macOS anyway, so I'll change that before I merge.
This change introduces a pretty large refactoring of the existing extension code to improve the overall user experience. Here is a summary of the changes: - The PowerShell session is now restartable at any time while VS Code is running without restarting the whole VS Code window. This is exposed through the "Restart PowerShell Session" command. - A new status indicator has been added to the status bar which lets the user know when the language server is starting, running, or in an error state. - Logs for the extension are now written to an output channel in the UI allowing the user to show them at any time with the "Show PowerShell Extension Logs" command. - Any failure to load the PowerShell session will show an error message to the user and give them the opportunity to show the extension logs. - If the PowerShell process ends unexpectedly at any time, the user will be shown a prompt to restart the session. - Logs for each session are now written out to individual log folders instead of creating them all in the same folder. Resolves #281.
a4b1257
to
636cb90
Compare
@rkeithhill Quick question: which nomenclature do you think is more appropriate for PowerShell folks, 32-bit/64-bit or x86/x64? The former is clearer but the latter seems to be used for the Windows PowerShell shortcuts (x86 at least). |
I'd go with the latter for the reason you mention - names of shortcuts and what shows up in the window title. |
This change completes the session management menu which allows the user to easily switch or restart their PowerShell session. It also improves log creation across sessions.
636cb90
to
5f60fc3
Compare
@@ -32,16 +32,17 @@ | |||
"vscode-languageclient": "1.3.1" |
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.
Is it missing "vscode-jsonrpc" ? I cannot compile it without adding "vscode-jsonrpc" as a dependency.
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.
Hmm, that shouldn't be the case, I'll come by your office later to take a look.
This change introduces a pretty large refactoring of the existing extension code to improve the overall user experience. Here is a summary of the changes:
Resolves #281.