Skip to content

Formatting PowerShell document during execution? #1562

Closed
@PrzemyslawKlys

Description

@PrzemyslawKlys

System Details

System Details Output

### VSCode version: 1.27.2 f46c4c469d6e6d8c46f268d1553c5dc4b475840f x64

### VSCode extensions:
[createInstance] extensionManagementService depends on downloadService which is NOT registered.
aaron-bond.better-comments@2.0.1
abusaidm.html-snippets@0.2.1
AlanWalk.markdown-toc@1.5.6
alefragnani.Bookmarks@9.1.0
azemoh.one-monokai@0.3.7
ban.spellright@3.0.2
batisteo.vscode-django@0.17.0
bierner.markdown-preview-github-styles@0.1.3
daiyy.quick-html-previewer@0.3.0
DavidAnson.vscode-markdownlint@0.20.0
DavidWang.ini-for-vscode@0.0.4
dbaeumer.vscode-eslint@1.6.0
donjayamanne.githistory@0.4.3
donjayamanne.jupyter@1.1.4
donjayamanne.python-extension-pack@1.4.0
DotJoshJohnson.xml@2.3.2
eamodio.gitlens@8.5.6
eg2.tslint@1.0.39
emilast.LogFileHighlighter@2.4.1
emmanuelbeziat.vscode-great-icons@2.1.44
Equinusocio.vsc-material-theme@2.4.2
felixfbecker.php-debug@1.12.6
formulahendry.code-runner@0.9.4
gerane.Theme-dimmed-monokai@0.0.2
gharveymn.nightswitch@1.1.0
GitHub.vscode-pull-request-github@0.1.6
GrapeCity.gc-excelviewer@2.1.26
hdg.live-html-previewer@0.3.0
hnw.vscode-auto-open-markdown-preview@0.0.4
HookyQR.beautify@1.4.4
IBM.output-colorizer@0.1.2
ikappas.phpcs@1.0.5
ionutvmi.reg@0.0.2
JerryHong.autofilename@0.1.3
joaompinto.asciidoctor-vscode@0.15.1
johnpapa.winteriscoming@0.8.0
Kelvin.vscode-sshfs@1.10.0
kisstkondoros.vscode-codemetrics@1.17.3
KnisterPeter.vscode-github@0.30.0
magicstack.MagicPython@1.1.0
mariorodeghiero.vue-theme@1.1.1
mechatroner.rainbow-csv@0.6.0
mkloubert.vs-deploy@14.0.0
mkloubert.vscode-remote-workspace@0.34.0
ms-mssql.mssql@1.4.0
ms-python.python@2018.8.0
ms-vscode.csharp@1.16.1
ms-vscode.PowerShell@1.9.0
ms-vsliveshare.vsliveshare@0.3.735
ms-vsts.team@1.136.0
quicktype.quicktype@12.0.46
redhat.java@0.32.0
robertohuertasm.vscode-icons@7.27.0
Shan.code-settings-sync@3.1.2
stkb.rewrap@1.9.1
streetsidesoftware.code-spell-checker@1.6.10
streetsidesoftware.code-spell-checker-polish@1.0.0
TomasHubelbauer.zip-file-system@1.0.0
vangware.dark-plus-material@1.4.3
VisualStudioExptTeam.vscodeintellicode@1.0.4
vscjava.vscode-java-debug@0.13.0
vscjava.vscode-java-pack@0.4.0
vscjava.vscode-java-test@0.9.0
vscjava.vscode-maven@0.11.0
WakaTime.vscode-wakatime@1.2.3
wayou.vscode-todo-highlight@1.0.4
whizkydee.material-palenight-theme@1.9.4
wholroyd.jinja@0.0.8
xaver.clang-format@1.6.2
yzhang.markdown-all-in-one@1.6.0
zhuangtongfa.Material-theme@2.17.3
Zignd.html-css-class-completion@1.11.0


### PSES version: 1.9.0.0

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      5.1.17763.1
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.1
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

I run a script. During running of the script I edit some stuff and press Save. It does format on save (as designed) but it seems it queue it for later...

image

image

Now if i continue edits it will queue it more and more..

Attached Logs

10/6/2018 8:47:46 PM [NORMAL] - Language server starting --
10/6/2018 8:47:46 PM [NORMAL] -     exe: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
10/6/2018 8:47:46 PM [NORMAL] -     args: C:\Users\pklys\.vscode\extensions\ms-vscode.powershell-1.9.0\modules\PowerShellEditorServices\Start-EditorServices.ps1 -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '1.9.0'-AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'C:\Users\pklys\.vscode\extensions\ms-vscode.powershell-1.9.0\modules'-EnableConsoleRepl -LogLevel 'Diagnostic' -LogPath 'C:\Users\pklys\.vscode\extensions\ms-vscode.powershell-1.9.0\logs\1538851666-301dad12-f1db-4f10-b147-f4b211689b651538724044891\EditorServices.log' -SessionDetailsPath 'C:\Users\pklys\.vscode\extensions\ms-vscode.powershell-1.9.0\sessions\PSES-VSCode-6188-174776' -FeatureFlags @()
10/6/2018 8:47:47 PM [NORMAL] - powershell.exe started, pid: 20588
10/6/2018 8:47:48 PM [NORMAL] - Language server started.
10/6/2018 8:47:48 PM [NORMAL] - Connecting to language service on pipe \\.\pipe\PSES_b63b9071-eebd-42a6-84a5-7cb714b7f19f...
10/6/2018 8:47:48 PM [NORMAL] - {"status":"started","debugServiceTransport":"NamedPipe","languageServiceTransport":"NamedPipe","debugServicePipeName":"\\\\.\\pipe\\PSES_2f66723a-cc27-406c-996b-64363372e615","languageServicePipeName":"\\\\.\\pipe\\PSES_b63b9071-eebd-42a6-84a5-7cb714b7f19f"}
10/6/2018 8:47:48 PM [NORMAL] - Language service connected.
10/6/2018 8:53:29 PM [VERBOSE] - Formatting entire document - file:///c%3A/Users/pklys/OneDrive%20-%20Evotec/Support/GitHub/PSWinDocumentation/Examples/Run-DocumentationADWithPasswordQuality.ps1...
10/6/2018 8:53:30 PM [VERBOSE] - Document formatting finished in 1.387s
10/6/2018 8:55:39 PM [VERBOSE] - Formatting entire document - file:///c%3A/Users/pklys/OneDrive%20-%20Evotec/Support/GitHub/PSWinDocumentation/Examples/Run-DocumentationADWithPasswordQuality.ps1...
10/6/2018 8:55:42 PM [VERBOSE] - Document formatting finished in 3.41s
10/6/2018 8:56:35 PM [VERBOSE] - Formatting entire document - file:///c%3A/Users/pklys/OneDrive%20-%20Evotec/Support/GitHub/PSWinDocumentation/Public/Get-WinADDomainInformation.ps1...
10/6/2018 8:56:42 PM [VERBOSE] - Formatting entire document - file:///c%3A/Users/pklys/OneDrive%20-%20Evotec/Support/GitHub/PSWinDocumentation/Public/Get-WinADDomainInformation.ps1...
10/6/2018 8:56:48 PM [VERBOSE] - Formatting entire document - file:///c%3A/Users/pklys/OneDrive%20-%20Evotec/Support/GitHub/PSWinDocumentation/Public/Get-WinADDomainInformation.ps1...
10/6/2018 9:15:44 PM [VERBOSE] - Formatting entire document - file:///c%3A/Users/pklys/OneDrive%20-%20Evotec/Support/GitHub/PSWinDocumentation/Examples/Run-DocumentationADWithPasswordQuality.ps1...

As you can see the script is running I press Save on multiple times and it seems to be starting reformat and reformat again and again. My guess is that when it's done it will do 4 times reformat right? Maybe it should disable that feature when script is running since it's not doing anything?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions