PowerShell / vscode-powershell

Provides PowerShell language and debugging support for Visual Studio Code
https://marketplace.visualstudio.com/items/ms-vscode.PowerShell
MIT License
1.71k stars 488 forks source link

VS Code\PowerShell - "Formatting Document" Long Execution Time #984

Open RickFlist opened 7 years ago

RickFlist commented 7 years ago

System Details

Name Value


PSVersion 5.1.15063.483
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.15063.483
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Copy / paste the following commands into the PowerShell Integrated Console, and paste the output here:

code -v 1.14.2 cb82febafda0c8c199b9201ad274e25d9a76874e

$pseditor.EditorServicesVersion Major Minor Build Revision


1 4 1 0

code --list-extensions --show-versions ms-vscode.PowerShell@1.4.1

$PSVersionTable v-toddle.microsoft.com.zip Name Value


PSVersion 5.1.15063.483
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.15063.483
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Issue Description

Hello! I posted this to VS Code and they referred me here (https://github.com/Microsoft/vscode/issues/31985#issuecomment-320095822)

I've noticed over the last couple days/week that VS Code is taking a very long time on "Formatting Document". I have my VS Code instance configured to format the document on every save, and I save constantly, so this is a real PITA. :( I have attached the contents of $env:APPDATA\Code\User to this report.

Steps to Reproduce

Steps to Reproduce:

Configure VS Code using my settings.json Open up any Posh Script. I have encountered this on scripts with as few as 120 lines Make a change Save file Blue bar at bottom of VS Code states "Formatting Document". VS Code is responsive, but Snippets and Intellisense do not function until it completes doing whatever it was doing. Reproduces without extensions: No

Attached Logs

v-toddle.microsoft.com.zip

Follow the instructions in the README about capturing and sending logs.

daviwil commented 7 years ago

Actually now that I read this, I see you mention that it happens even on short scripts. Is it consistently slow even when you open up a fresh VS Code session and try it?

RickFlist commented 7 years ago

It does NOT repro if I launch code with the --disable-extensions parameter. Otherwise, it repros every single time, seemingly regardless of what extensions I have installed or the size of the script or the freshness of the session

daviwil commented 7 years ago

This issue is caused by the PowerShell extension, so that's really the only thing that matters in this case. I'll take a look at your logs tomorrow and let you know if there's anything you can try to narrow down the source of the issue.

RickFlist commented 7 years ago

Thanks. Not being able to use Snippets has really slowed me down. :\

RickFlist commented 7 years ago

I also just noticed that CTRL+SHIFT+O does not list all the functions in a module as well. I verified integrated terminal started and even killed and and restarted it. CTRL+SHIFT+O states "no symbol information found"

RickFlist commented 7 years ago

FYI, while working on something I accidentally moved my powershell.json snippets file. This resolved the performance issues.

daviwil commented 7 years ago

@kapilmb will look into this for the next release

RickFlist commented 7 years ago

The snippets file was a red herring, after about 30 minutes the perf issues came back. Is there a workaround? Not having intellisense is very annoying

daviwil commented 7 years ago

You could try turning off PSScriptAnalyzer in your settings:

"powershell.scriptAnalysis.enable": false
RickFlist commented 7 years ago

That seems to work. Thank you so much.

RickFlist commented 7 years ago

Fudge. It's back.

kapilmb commented 7 years ago

@RickFlist There is a good chance that the formatter is crashing, which is causing the problem. There are a few situations I can think of that that can cause it to crash but would like to know for sure what is causing the problem on your side.

Would it be possible for you to share the document on which this is happening so that I can find out the exact issue? Thanks!

RickFlist commented 7 years ago

It literally happens in everything. I can open a new document and start typing, and intellisense fails

kapilmb commented 7 years ago

It literally happens in everything

This is very strange. I see that the zip file you have attached does not contain the logs. Can you please try sending me the logs again for the instance when you encounter the issue? (Steps for sending logs here: https://github.com/PowerShell/vscode-powershell#reporting-problems). Thanks.

RickFlist commented 7 years ago

yup. won't be until EOD Monday probably

RickFlist commented 7 years ago

I checked and editorServicesLogLevel was already set to verbose. So I looked in the logs folder and still have logs from the time when I submitted the original issue, plus logs from the interim. Hopefully there is a plethora of information contained therein

v-toddle@microsoft.com-vscode-powershell-logs-[2017-08-09 to 2017-08-21].zip

daviwil commented 7 years ago

Thanks Todd. What did you use to create the ZIP file? I actually get two different sets of files when I open it with different ZIP tools on Windows and Linux.

RickFlist commented 7 years ago

7-Zip, but it should have created a standard zip archive? I re-created the archive using Windows (not 7zip) and I have attached both archives again with names indicating what created the archive (tail of filename)

v-toddle@microsoft.com-vscode-powershell-logs-[2017-08-09 to 2017-08-21]-WindowsZip.zip v-toddle@microsoft.com-vscode-powershell-logs-[2017-08-09 to 2017-08-21]-7zip.zip

RickFlist commented 7 years ago

Here's what should be in the .zip

FullName Length


C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502296501-86693425-df14-4011-a748-15b3e06ad11a1502296496291
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502394705-d7db7f59-1b60-40f0-aadb-b650407da0de1502394704311
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502484190-674856ff-0263-4032-aed6-600be03467fb1502483586258
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502729019-3661bb32-d60b-4946-8200-f3202add6fe31502729005801
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502729786-77e7e0cc-86b1-4a67-8b6e-623c158ea48b1502729274342
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502738484-3ea3e7d8-3c86-46fa-9f67-6df6864dab911502738476677
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502738492-fa5a9c5b-610d-406f-b698-65fca94966521502738487585
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502748351-a5075c32-a52a-46b6-9cae-b856667d63561502747978645
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502809109-b3285ce6-7d0d-46d6-9262-a74445c796491502809097513
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502814149-a38ea32c-383d-4a25-93f7-f826e9f2566f1502814130335
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502815008-a62dbffb-c1df-4716-9555-d3324104bdfb1502814988603
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502819534-79e7a89c-ec09-4ed3-9ad6-2614ffff028b1502819519663
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502820143-428024c6-d3ff-4903-bd60-785b4d2a00161502820133071
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502821288-2c800ad1-af08-4565-9a2b-871e060652e81502821274934
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502821526-078cd967-2fee-403f-b813-4a07ac36f4c31502821524119
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502900559-b62167d6-5dc5-4385-b5f4-7f63f493f63c1502900557367
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502921031-8660bf29-d0a8-4b39-9efe-c39d887656641502921019209
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502987218-8a29469c-6a1a-4fc0-bb5c-5a9c940f9d121502985992310
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1503076923-8a29469c-6a1a-4fc0-bb5c-5a9c940f9d121502985992310
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1503083033-98fd55e4-ddf2-46a6-9225-82831f9366cb1503083023978
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1503345146-6d02d1b5-7466-46bf-9651-1d74977141931503343022917
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1503345804-6689e193-7e9d-45dc-b4c3-6aea7230ab771503345801616
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\v-toddle@microsoft.com-vscode-powershell-logs-[2017-08-09 to 2017-08-21]-7zip.zip 1077729 C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\v-toddle@microsoft.com-vscode-powershell-logs-[2017-08-09 to 2017-08-21]-WindowsZip.zip 1096329 C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502296501-86693425-df14-4011-a748-15b3e06ad11a1502296496291\EditorServices.log 10068396 C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502296501-86693425-df14-4011-a748-15b3e06ad11a1502296496291\vscode-powershell.log 1188
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502394705-d7db7f59-1b60-40f0-aadb-b650407da0de1502394704311\EditorServices.log 94372
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502394705-d7db7f59-1b60-40f0-aadb-b650407da0de1502394704311\vscode-powershell.log 1193
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502484190-674856ff-0263-4032-aed6-600be03467fb1502483586258\EditorServices.log 138582
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502484190-674856ff-0263-4032-aed6-600be03467fb1502483586258\vscode-powershell.log 1193
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502729019-3661bb32-d60b-4946-8200-f3202add6fe31502729005801\EditorServices.log 2310
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502729019-3661bb32-d60b-4946-8200-f3202add6fe31502729005801\vscode-powershell.log 1172
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502729786-77e7e0cc-86b1-4a67-8b6e-623c158ea48b1502729274342\EditorServices.log 1675203 C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502729786-77e7e0cc-86b1-4a67-8b6e-623c158ea48b1502729274342\vscode-powershell.log 1190
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502738484-3ea3e7d8-3c86-46fa-9f67-6df6864dab911502738476677\vscode-powershell.log 115
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502738492-fa5a9c5b-610d-406f-b698-65fca94966521502738487585\EditorServices.log 1095202 C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502738492-fa5a9c5b-610d-406f-b698-65fca94966521502738487585\vscode-powershell.log 1171
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502748351-a5075c32-a52a-46b6-9cae-b856667d63561502747978645\EditorServices.log 134210
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502748351-a5075c32-a52a-46b6-9cae-b856667d63561502747978645\vscode-powershell.log 1189
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502809109-b3285ce6-7d0d-46d6-9262-a74445c796491502809097513\EditorServices.log 822171
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502809109-b3285ce6-7d0d-46d6-9262-a74445c796491502809097513\vscode-powershell.log 1190
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502814149-a38ea32c-383d-4a25-93f7-f826e9f2566f1502814130335\EditorServices.log 27322
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502814149-a38ea32c-383d-4a25-93f7-f826e9f2566f1502814130335\vscode-powershell.log 1189
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502815008-a62dbffb-c1df-4716-9555-d3324104bdfb1502814988603\EditorServices.log 1259173 C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502815008-a62dbffb-c1df-4716-9555-d3324104bdfb1502814988603\vscode-powershell.log 1189
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502819534-79e7a89c-ec09-4ed3-9ad6-2614ffff028b1502819519663\EditorServices.log 18109
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502819534-79e7a89c-ec09-4ed3-9ad6-2614ffff028b1502819519663\vscode-powershell.log 1097
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502820143-428024c6-d3ff-4903-bd60-785b4d2a00161502820133071\EditorServices.log 31765
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502820143-428024c6-d3ff-4903-bd60-785b4d2a00161502820133071\vscode-powershell.log 1189
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502821288-2c800ad1-af08-4565-9a2b-871e060652e81502821274934\EditorServices.log 99549
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502821288-2c800ad1-af08-4565-9a2b-871e060652e81502821274934\vscode-powershell.log 1191
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502821526-078cd967-2fee-403f-b813-4a07ac36f4c31502821524119\EditorServices.log 2620708 C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502821526-078cd967-2fee-403f-b813-4a07ac36f4c31502821524119\vscode-powershell.log 1191
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log 5181630 C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\vscode-powershell.log 1188
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502900559-b62167d6-5dc5-4385-b5f4-7f63f493f63c1502900557367\EditorServices.log 14135
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502900559-b62167d6-5dc5-4385-b5f4-7f63f493f63c1502900557367\vscode-powershell.log 1190
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log 15712722 C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\vscode-powershell.log 1189
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502921031-8660bf29-d0a8-4b39-9efe-c39d887656641502921019209\EditorServices.log 187773
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502921031-8660bf29-d0a8-4b39-9efe-c39d887656641502921019209\vscode-powershell.log 1189
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502987218-8a29469c-6a1a-4fc0-bb5c-5a9c940f9d121502985992310\EditorServices.log 4677096 C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1502987218-8a29469c-6a1a-4fc0-bb5c-5a9c940f9d121502985992310\vscode-powershell.log 1188
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1503076923-8a29469c-6a1a-4fc0-bb5c-5a9c940f9d121502985992310\EditorServices.log 641109
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1503076923-8a29469c-6a1a-4fc0-bb5c-5a9c940f9d121502985992310\vscode-powershell.log 1169
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1503083033-98fd55e4-ddf2-46a6-9225-82831f9366cb1503083023978\EditorServices.log 16936
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1503083033-98fd55e4-ddf2-46a6-9225-82831f9366cb1503083023978\vscode-powershell.log 1188
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1503345146-6d02d1b5-7466-46bf-9651-1d74977141931503343022917\EditorServices.log 84865
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1503345146-6d02d1b5-7466-46bf-9651-1d74977141931503343022917\vscode-powershell.log 1171
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1503345804-6689e193-7e9d-45dc-b4c3-6aea7230ab771503345801616\EditorServices.log 77428
C:\Users\v-toddle.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1503345804-6689e193-7e9d-45dc-b4c3-6aea7230ab771503345801616\vscode-powershell.log 1093

kapilmb commented 7 years ago

I looked through the logs that you attached, and I cannot find anything wrong with the formatter just through the logs:

PS> find *.log | sls textDocument/.*format

1502296501-86693425-df14-4011-a748-15b3e06ad11a1502296496291\EditorServices.log:5341:    Received Request 'textDocument/rangeFormatting' with id 174
1502296501-86693425-df14-4011-a748-15b3e06ad11a1502296496291\EditorServices.log:5349:    Writing Response 'textDocument/rangeFormatting' with id 174
1502296501-86693425-df14-4011-a748-15b3e06ad11a1502296496291\EditorServices.log:10490:    Received Request 'textDocument/rangeFormatting' with id 368
1502296501-86693425-df14-4011-a748-15b3e06ad11a1502296496291\EditorServices.log:10498:    Writing Response 'textDocument/rangeFormatting' with id 368
1502484190-674856ff-0263-4032-aed6-600be03467fb1502483586258\EditorServices.log:1104:    Received Request 'textDocument/rangeFormatting' with id 41
1502484190-674856ff-0263-4032-aed6-600be03467fb1502483586258\EditorServices.log:1112:    Writing Response 'textDocument/rangeFormatting' with id 41
1502729786-77e7e0cc-86b1-4a67-8b6e-623c158ea48b1502729274342\EditorServices.log:1568:    Received Request 'textDocument/rangeFormatting' with id 50
1502729786-77e7e0cc-86b1-4a67-8b6e-623c158ea48b1502729274342\EditorServices.log:1576:    Writing Response 'textDocument/rangeFormatting' with id 50
1502738492-fa5a9c5b-610d-406f-b698-65fca94966521502738487585\EditorServices.log:5963:    Received Request 'textDocument/rangeFormatting' with id 282
1502738492-fa5a9c5b-610d-406f-b698-65fca94966521502738487585\EditorServices.log:5971:    Writing Response 'textDocument/rangeFormatting' with id 282
1502738492-fa5a9c5b-610d-406f-b698-65fca94966521502738487585\EditorServices.log:12026:    Received Request 'textDocument/rangeFormatting' with id 560
1502738492-fa5a9c5b-610d-406f-b698-65fca94966521502738487585\EditorServices.log:12034:    Writing Response 'textDocument/rangeFormatting' with id 560
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:330:    Received Request 'textDocument/rangeFormatting' with id 5
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:338:    Writing Response 'textDocument/rangeFormatting' with id 5
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:1351:    Received Request 'textDocument/rangeFormatting' with id 45
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:1359:    Writing Response 'textDocument/rangeFormatting' with id 45
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:9090:    Received Request 'textDocument/rangeFormatting' with id 345
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:9098:    Writing Response 'textDocument/rangeFormatting' with id 345
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:9298:    Received Request 'textDocument/rangeFormatting' with id 349
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:9306:    Writing Response 'textDocument/rangeFormatting' with id 349
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:9965:    Received Request 'textDocument/rangeFormatting' with id 378
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:9973:    Writing Response 'textDocument/rangeFormatting' with id 378
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:10363:    Received Request 'textDocument/rangeFormatting' with id 389
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:10371:    Writing Response 'textDocument/rangeFormatting' with id 389
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:87037:    Received Request 'textDocument/rangeFormatting' with id 3167
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:87045:    Writing Response 'textDocument/rangeFormatting' with id 3167
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:90576:    Received Request 'textDocument/rangeFormatting' with id 3272
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:90584:    Writing Response 'textDocument/rangeFormatting' with id 3272
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:90632:    Received Request 'textDocument/rangeFormatting' with id 3275
1502834407-cc2b2004-936c-44f1-8a61-12a94f7c1a791502834404943\EditorServices.log:90640:    Writing Response 'textDocument/rangeFormatting' with id 3275
1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log:470:    Received Request 'textDocument/rangeFormatting' with id 14
1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log:478:    Writing Response 'textDocument/rangeFormatting' with id 14
1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log:1395:    Received Request 'textDocument/rangeFormatting' with id 43
1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log:1403:    Writing Response 'textDocument/rangeFormatting' with id 43
1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log:2658:    Received Request 'textDocument/rangeFormatting' with id 85
1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log:2666:    Writing Response 'textDocument/rangeFormatting' with id 85
1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log:2877:    Received Request 'textDocument/rangeFormatting' with id 98
1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log:2885:    Writing Response 'textDocument/rangeFormatting' with id 98
1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log:4339:    Received Request 'textDocument/rangeFormatting' with id 145
1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log:4347:    Writing Response 'textDocument/rangeFormatting' with id 145
1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log:4644:    Received Request 'textDocument/rangeFormatting' with id 157
1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log:4652:    Writing Response 'textDocument/rangeFormatting' with id 157
1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log:6569:    Received Request 'textDocument/rangeFormatting' with id 226
1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log:6582:    Writing Response 'textDocument/rangeFormatting' with id 226
1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log:6906:    Received Request 'textDocument/rangeFormatting' with id 240
1502902671-c934413e-06b9-4863-a438-f155b9e5879b1502902668890\EditorServices.log:6914:    Writing Response 'textDocument/rangeFormatting' with id 240
1502987218-8a29469c-6a1a-4fc0-bb5c-5a9c940f9d121502985992310\EditorServices.log:5672:    Received Request 'textDocument/rangeFormatting' with id 82
1502987218-8a29469c-6a1a-4fc0-bb5c-5a9c940f9d121502985992310\EditorServices.log:5680:    Writing Response 'textDocument/rangeFormatting' with id 82
1502987218-8a29469c-6a1a-4fc0-bb5c-5a9c940f9d121502985992310\EditorServices.log:48622:    Received Request 'textDocument/rangeFormatting' with id 1707
1502987218-8a29469c-6a1a-4fc0-bb5c-5a9c940f9d121502985992310\EditorServices.log:48630:    Writing Response 'textDocument/rangeFormatting' with id 1707
1503076923-8a29469c-6a1a-4fc0-bb5c-5a9c940f9d121502985992310\EditorServices.log:2408:    Received Request 'textDocument/rangeFormatting' with id 94
1503076923-8a29469c-6a1a-4fc0-bb5c-5a9c940f9d121502985992310\EditorServices.log:2416:    Writing Response 'textDocument/rangeFormatting' with id 94

It seems all the formatting requests are honored by the server, and it is not clear why the formatting powershell document... should stay stuck in the status bar.

My initial hunch was that the formatter crashed, but the only crash at the server appears only in one log file:

    ProtocolEndpoint message loop terminated due to unhandled exception:

    System.AggregateException: One or more errors occurred. ---> System.IO.FileNotFoundException: Could not find file 'd:\Source\MAX-CPub-Lab\QuickStart\SQL-SAO-SQL2014SP2-WS2012R2\dsc\MicrosoftAzure_xSqlLogin.psm1'.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
       at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
       at Microsoft.PowerShell.EditorServices.LanguageService.<FindReferencesOfSymbol>d__18.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.PowerShell.EditorServices.CodeLenses.ReferencesCodeLensProvider.<ResolveCodeLensAsync>d__4.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.PowerShell.EditorServices.CodeLenses.CodeLensFeature.<HandleCodeLensResolveRequest>d__6.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.MessageDispatcher.<DispatchMessage>d__7.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.ProtocolEndpoint.<ListenForMessages>d__36.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.PowerShell.EditorServices.Utility.AsyncContext.Start(Func`1 asyncMainFunc, ILogger logger)
       at System.Threading.Tasks.Task.Execute()
       --- End of inner exception stack trace ---
    ---> (Inner Exception #0) System.IO.FileNotFoundException: Could not find file 'd:\Source\MAX-CPub-Lab\QuickStart\SQL-SAO-SQL2014SP2-WS2012R2\dsc\MicrosoftAzure_xSqlLogin.psm1'.
    File name: 'd:\Source\MAX-CPub-Lab\QuickStart\SQL-SAO-SQL2014SP2-WS2012R2\dsc\MicrosoftAzure_xSqlLogin.psm1'
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
       at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
       at Microsoft.PowerShell.EditorServices.LanguageService.<FindReferencesOfSymbol>d__18.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.PowerShell.EditorServices.CodeLenses.ReferencesCodeLensProvider.<ResolveCodeLensAsync>d__4.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.PowerShell.EditorServices.CodeLenses.CodeLensFeature.<HandleCodeLensResolveRequest>d__6.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.MessageDispatcher.<DispatchMessage>d__7.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.ProtocolEndpoint.<ListenForMessages>d__36.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.PowerShell.EditorServices.Utility.AsyncContext.Start(Func`1 asyncMainFunc, ILogger logger)
       at System.Threading.Tasks.Task.Execute()<---

8/18/2017 10:21:57 AM [ERROR] - Method "ProtocolEndpoint_UnhandledException" at line 417 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Host\EditorServicesHost.cs

    PowerShell Editor Services is terminating due to an unhandled exception, see previous logs for details.

Is there anything else that you can provide me to solve this issue? Any file to repro the issue would be great.

RickFlist commented 7 years ago

Try these. They are pretty much the only two modules I've been working with over that time frame.

[Redacted]

RickFlist commented 7 years ago

So, with caution, I am going to say that over the last 24 hours VS Code has been much more performant. There are still often delays in intellisense and Formatting Document does will sometimes run much faster.

I have made the following changes since bug opened:

RickFlist commented 7 years ago

Hey Kapil, I just tried to format the CP-Azure.psm1 file in VS Code and it hung on "Formatting Document" forever. I opened up the logs and searched for error, and found this line repeated in bursts:

8/23/2017 1:43:32 PM [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

MessageDispatcher: No handler registered for Event type '$/cancelRequest'

image

I'm wondering if the reason it is hanging is because the request to cancel is not getting caught and honored?

Logs attached. Contact me if you want an updated version of CP-Azure.psm1 for repro v-toddle@microsoft.com-vscode-powershell-logs-[2017-08-09 to 2017-08-23]-WindowsZip.zip

RickFlist commented 7 years ago

Hi Kapil, were you ever able to repro or make any progress on this?

fcharlie commented 7 years ago

vscode-powershell 1.43 format slow...

2017/9/20 23:21:51 [NORMAL] - Method "StartLogging" at line 144 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Host\EditorServicesHost.cs

    PowerShell Editor Services Host v1.4.1.0 starting (pid 1164)...

      Host application details:

        Name:      Visual Studio Code Host
        ProfileId: Microsoft.VSCode
        Version:   1.4.3
        Arch:      64-bit

      Operating system details:

        Version: Microsoft Windows NT 10.0.15063.0
        Arch:    64-bit

2017/9/20 23:21:52 [NORMAL] - Method "StartLanguageService" at line 180 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Host\EditorServicesHost.cs

    Language service started, listening on port 14461

2017/9/20 23:21:52 [NORMAL] - Method "StartDebugService" at line 254 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Host\EditorServicesHost.cs

    Debug service started, listening on port 19538

2017/9/20 23:21:55 [NORMAL] - Method "Initialize" at line 220 of C:\projects\powershelleditorservices\src\PowerShellEditorServices\Session\PowerShellContext.cs

    PowerShell runtime version: 5.1.15063.608, edition: Desktop

2017/9/20 23:21:58 [NORMAL] - Method "FindPSScriptAnalyzerModule" at line 354 of C:\projects\powershelleditorservices\src\PowerShellEditorServices\Analysis\AnalysisService.cs

    PSScriptAnalyzer found at C:\Users\CharlieInc\.vscode\extensions\ms-vscode.powershell-1.4.3\modules\PSScriptAnalyzer\PSScriptAnalyzer.psd1

2017/9/20 23:22:04 [ERROR] - Method "ExecuteCommand" at line 545 of C:\projects\powershelleditorservices\src\PowerShellEditorServices\Session\PowerShellContext.cs

    Execution completed with errors:

2017/9/20 23:22:04 [NORMAL] - Method "Register" at line 36 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.VSCode\ComponentRegistration.cs

    PowerShell Editor Services VS Code module loaded.

2017/9/20 23:22:07 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type 'initialized'

2017/9/20 23:22:07 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/setTraceNotification'

2017/9/20 23:23:27 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:28 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:29 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:29 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:29 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:29 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:29 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:29 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:29 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:29 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:29 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:29 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:29 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:31 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:31 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:31 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:31 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:31 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:31 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:31 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:31 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:32 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:33 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:33 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:23:33 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:24:47 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:25:17 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:25:17 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:25:17 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:25:17 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:25:50 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:25:50 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:25:50 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:25:50 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:26:21 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:26:21 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:26:46 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:26:46 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:26:46 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:05 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:05 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:05 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:05 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:33 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:33 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:33 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:34 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:34 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:35 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:35 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:35 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:35 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:35 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:35 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:35 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:35 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:35 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:35 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:35 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:35 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:36 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:36 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:36 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:36 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:36 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:36 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:36 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:36 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:36 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:36 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:36 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:27:36 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:28:19 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:28:19 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:28:46 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:29:06 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:29:23 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'

2017/9/20 23:29:41 [ERROR] - Method "DispatchMessage" at line 147 of C:\projects\powershelleditorservices\src\PowerShellEditorServices.Protocol\MessageProtocol\MessageDispatcher.cs

    MessageDispatcher: No handler registered for Event type '$/cancelRequest'
TylerLeonhardt commented 6 years ago

Hey there, I'm triaging a bunch and I don't think we know exactly what the problem is just yet. I'm removing the Issue tag until we understand more.

saqwel commented 6 years ago

Hello. I have the same log as fcharlie in previous comment. I could not install PowerShell extension through "Install from VSIX" so I simply unzip VSIX to extensions folder. Extension works, but log full of the errors.

Environment details: Version 1.19.1 Commit 0759f77bb8d86658bc935a10a64f6182c5a1eeba Date 2017-12-19T09:46:23.884Z Shell 1.7.9 Renderer 58.0.3029.110 Node 7.9.0 Architecture x64

PowerShell extension version 1.5.1.

CodyMathis123 commented 5 years ago

I have this issue as well.

Version: 1.32.3 (system setup) Commit: a3db5be9b5c6ba46bb7555ec5d60178ecc2eaae4 Date: 2019-03-14T23:43:35.476Z Electron: 3.1.6 Chrome: 66.0.3359.181 Node.js: 10.2.0 V8: 6.6.346.32 OS: Windows_NT x64 10.0.17763

Be happy to provide anything requested. This one kills my productivity and I commonly drag scripts into PowerShell studio as it formats scripts instantaneously.

mike-loux-planview commented 3 years ago

I have been seeing this a LOT over the past few months, whereas before it was instantaneous.
VS Code info:

Version: 1.52.1 (system setup)
Commit: ea3859d4ba2f3e577a159bc91e3074c5d85c0523
Date: 2020-12-16T16:34:46.910Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.18363

ms-vscode.powershell version 2020.6.0 (guess that's pretty obvious based on the date, but figured I better put it in here anyway).

Also willing to provide any info I can.

SydneyhSmith commented 3 years ago

Thanks everyone, if anyone has an input script they would be willing to share that reproduces this issue that would be very helpful...thanks!