question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Format document hangs indefinitely

See original GitHub issue

Right clicking on a script and selecting format document sometimes stalls out and all you get is the text “Formatting current document…” in the status bar.

System Details

  • Operating system name and version:
  • VS Code version: 1.13.0
  • PowerShell extension version: 1.3.1
  • Output from $PSVersionTable: Name Value

PSVersion 5.1.15063.296 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} BuildVersion 10.0.15063.296 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1

Issue Description

I am experiencing a problem with…

Attached Logs

[0:2:50] Language server starting… powershell.exe started – pid: 7396 exe: C:\WINDOWS\Sysnative\WindowsPowerShell\v1.0\powershell.exe args: C:\Users\matt.vscode\extensions\ms-vscode.powershell-1.3.1\scripts\Start-EditorServices.ps1 -EditorServicesVersion ‘1.3.1’ -HostName ‘Visual Studio Code Host’ -HostProfileId ‘Microsoft.VSCode’ -HostVersion ‘1.3.1’ -BundledModulesPath ‘C:\Users\matt.vscode\extensions\ms-vscode.powershell-1.3.1\modules’ -EnableConsoleRepl -LogLevel ‘Normal’ -LogPath ‘C:\Users\matt.vscode\extensions\ms-vscode.powershell-1.3.1\logs\1497067370-99efb25e-e506-4ad6-9e6d-0a28c6750e141497064145804\EditorServices.log’ -SessionDetailsPath ‘C:\Users\matt.vscode\extensions\ms-vscode.powershell-1.3.1\sessions\PSES-VSCode-16500-919759’ -FeatureFlags @()

[0:2:58] Language server started. {“debugServicePort”:23032,“status”:“started”,“channel”:“tcp”,“languageServicePort”:26349} Connecting to language service on port 26349…

Language service connected.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
daviwilcommented, Jun 10, 2017

That’s the fix, I took out this line:

    throw new InvalidMattException();
1reaction
daviwilcommented, Jun 10, 2017

Hmmm, maybe both of you are seeing a manifestation of #857. This causes the language server to hang once it happens. I think I just fixed it, might ship an update today or tomorrow!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Formatting on Save hangs indefinitely starting in version 1.42
Since version 1.42 my formatters stopped functioning properly. Looking online it looks like many formatters are experiencing the same issue.
Read more >
Clean excess cell formatting on a worksheet - Microsoft Support
Use the clean excess cell formatting tool to remove unused formatting that could be causing problems with your workbook.
Read more >
c++ - Vscode auto format code stops working after few runs
The problem is after executing this command for few times, it will suddenly stop working and won't respond anymore either using the shortcut...
Read more >
Fixed issues in InDesign - Adobe Support
InDesign hangs due to issues with long footnotes. [macOS Only] InDesign hangs when working with documents with Proximity dictionaries.
Read more >
Formatting Stuck in Disk Management? Try EaseUS Partition ...
Step 1. Right-click the hard drive partition and choose the "Format" option. Step 2. In the new window, set the Partition label, File ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found