Skip to content

Provide progress indicator for language/debug server startup #281

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

Closed
daviwil opened this issue Sep 7, 2016 · 6 comments
Closed

Provide progress indicator for language/debug server startup #281

daviwil opened this issue Sep 7, 2016 · 6 comments
Labels
Issue-Enhancement A feature request (enhancement).
Milestone

Comments

@daviwil
Copy link
Contributor

daviwil commented Sep 7, 2016

Some users are attempting to start debugging just after loading a PowerShell script for the first time in a session. In some cases the language and debug servers have not yet finished initializing so there needs to be some indication in the UI that the extension isn't fully initialized yet.

@daviwil daviwil added the Issue-Enhancement A feature request (enhancement). label Sep 7, 2016
@daviwil daviwil added this to the 0.8.0 milestone Sep 7, 2016
@daviwil
Copy link
Contributor Author

daviwil commented Sep 7, 2016

Adding this to 0.8.0 but I might fix it in a patch release if it turns out to be a common source of confusion.

@daviwil
Copy link
Contributor Author

daviwil commented Sep 7, 2016

Also need to have a better error message when the user tries to run the debugger when PSES hasn't finished starting.

@rkeithhill
Copy link
Contributor

rkeithhill commented Sep 7, 2016

BTW, depending on what's in the user's profile this can take several seconds. I've seen PowerShell take as much as ~15 seconds to cold start (on one of my slower machines). The 5.1 version of PowerShell will tell you how long it took to process your profile - giving you a strong hint that if you want PowerShell to load faster - lighten up your profile. I wonder if we could do the same? Display a progress message like "Processing your PowerShell profile scripts...", "Importing and initializing the PowerShellEditorServices module...".

@daviwil
Copy link
Contributor Author

daviwil commented Sep 7, 2016

Based on the way I do startup I'm not sure if I'll be able to give updates to the UI between those phases. I launch powershell.exe and it basically takes care of loading the PSES module. Maybe after loading is complete I could give some message if a certain part of the process takes longer than a certain time expectation?

@daviwil
Copy link
Contributor Author

daviwil commented Sep 12, 2016

I've decided to do this work for 0.8.0 since there are a few things I want to do to make it easier for users to easily understand the state of PSES when the extension is running:

  • Implement new status bar item like the C# extension which makes it obvious whether PSES is initializing, running, or failed.
  • Create a new output channel which will contain client-side PSES log output
  • Hook up a command to the status bar item which shows the PSES log output window in case any error occurs

@daviwil
Copy link
Contributor Author

daviwil commented Sep 14, 2016

I've pushed a branch with the initial work on this here: https://github.com/PowerShell/vscode-powershell/tree/daviwil/extension-status. Will continue after I've completed some other things.

daviwil added a commit that referenced this issue Nov 29, 2016
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

No branches or pull requests

2 participants