Skip to content

Integrated terminal needs multi-line input support #569

@ChrisLynchHPE

Description

@ChrisLynchHPE

System Details

  • Operating system name and version: Windows 10.15058 (Insiders Fast Ring)
  • VS Code version: 1.10.2
  • PowerShell extension version: 0.10
  • Output from $PSVersionTable:
Name                           Value
----                           -----
PSVersion                      5.1.15058.0
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.15058.0
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

I have a Hashtable in my PowerShell module, and the new terminal in 0.10 does not work correctly like it used to. Paste the following into the Terminal:

$MyHT = @{
   key1 = 'value1';
   key2 = 'value2
}

And you will get the following output:

PS C:\Users\chris> $MyHT = @{
The hash literal was incomplete.
At line:0 char:0
PS C:\Users\chris>    key1 = 'value1';
key1 : The term 'key1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.
At line:1 char:4
+    key1 = 'value1';
+    ~~~~
    + CategoryInfo          : ObjectNotFound: (key1:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\chris>    key2 = 'value2
The string is missing the terminator: '.
At line:0 char:0
PS C:\Users\chris> }

Not only does one get the exceptions above, but the terminal is extremely slow. I don't know if it's because of the loaded PSM1 file I have (which is more than 80k lines, and 2.2MB in size).

Attached Logs

When I enable plugin verbose logging, powershell.exe will terminate and I can't then reproduce the issue:

powershell.exe started --
    pid: 940
    exe: C:\WINDOWS\Sysnative\WindowsPowerShell\v1.0\powershell.exe
    args: C:\Users\chris\.vscode\extensions\ms-vscode.PowerShell-0.10.0\scripts\Start-EditorServices.ps1 -EditorServicesVersion '0.10.0' -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '0.10.0' -BundledModulesPath 'C:\Users\chris\.vscode\extensions\ms-vscode.PowerShell-0.10.0\modules' -EnableConsoleRepl -LogLevel 'Verbose' -LogPath 'C:\Users\chris\.vscode\extensions\ms-vscode.PowerShell-0.10.0\logs\1489692702-86da6b33-6d62-41a2-a912-eb66f3cd355a1489692658699\EditorServices.log' -SessionDetailsPath 'C:\Users\chris\.vscode\extensions\ms-vscode.PowerShell-0.10.0\sessions\PSES-VSCode-12712' 



powershell.exe terminated or terminal UI was closed

Could not start language service: 
Timed out waiting for session file to appear.

(the log file generated contains the text I pasted above.)

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