Skip to content

Cannot start powershell 6 in debug on vscode #1703

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
LazerFX opened this issue Jan 18, 2019 · 4 comments
Closed

Cannot start powershell 6 in debug on vscode #1703

LazerFX opened this issue Jan 18, 2019 · 4 comments

Comments

@LazerFX
Copy link

LazerFX commented Jan 18, 2019

Trying to run pwsh.exe as a debug environment does not work in vscode. The terminal starts, but appears to disconnect from the environment immediately. Looking at the logs, I see:

1/18/2019 11:10:56 AM [NORMAL] - Language server starting --
1/18/2019 11:10:56 AM [NORMAL] -     exe: C:\Program Files\PowerShell\6\pwsh.exe
1/18/2019 11:10:56 AM [NORMAL] -     args: C:\Users\pstreet\.vscode\extensions\ms-vscode.powershell-1.10.2\modules\PowerShellEditorServices\Start-EditorServices.ps1 -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '1.10.2' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'C:\Users\pstreet\.vscode\extensions\ms-vscode.powershell-1.10.2\modules' -EnableConsoleRepl -LogLevel 'Normal' -DebugServiceOnly -LogPath 'C:\Users\pstreet\.vscode\extensions\ms-vscode.powershell-1.10.2\logs\1547804527-4208a79f-0b41-47bb-a104-75bf366ab1ec1547804506522\DebugSession-1.log' -SessionDetailsPath 'C:\Users\pstreet\.vscode\extensions\ms-vscode.powershell-1.10.2\sessions\PSES-VSCode-14592-Debug' -FeatureFlags @()
1/18/2019 11:10:57 AM [NORMAL] - powershell.exe started, pid: 28196
1/18/2019 11:11:00 AM [NORMAL] - powershell.exe terminated or terminal UI was closed

Attempting to run the command manually, I get the following output:

PS C:\WINDOWS\system32> & 'C:\Program Files\PowerShell\6\pwsh.exe' C:\Users\pstreet\.vscode\extensions\ms-vscode.powershell-1.10.2\modules\PowerShellEditorServices\Start-EditorServices.ps1 -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '1.10.2' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'C:\Users\pstreet\.vscode\extensions\ms-vscode.powershell-1.10.2\modules' -EnableConsoleRepl -LogLevel 'Normal' -DebugServiceOnly -LogPath 'C:\Users\pstreet\.vscode\extensions\ms-vscode.powershell-1.10.2\logs\1547804527-4208a79f-0b41-47bb-a104-75bf366ab1ec1547804506522\DebugSession-1.log' -SessionDetailsPath 'C:\Users\pstreet\.vscode\extensions\ms-vscode.powershell-1.10.2\sessions\PSES-VSCode-14592-Debug' -FeatureFlags @()
C:\Users\pstreet\.vscode\extensions\ms-vscode.powershell-1.10.2\modules\PowerShellEditorServices\Start-EditorServices.ps1 : Missing an argument for parameter 'FeatureFlags'. Specify a parameter of type 'System.String[]' and try again.
+ CategoryInfo          : InvalidArgument: (:) [Start-EditorServices.ps1], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingArgument,Start-EditorServices.ps1

PS C:\WINDOWS\system32>

This also fails if I use powershell.exe as the source, that also wants a string rather than an array.

Once I remove the -FeatureFlags @() section of the command, I get a comman line with PowerShell Integrated Terminal that apparently does nothing (I suspect because it's told to receive and pipe its output externally).

Versions:

VSCode version: 1.30.2 61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8 x64

VSCode extensions:

[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

PSES version: 1.10.2.0

PowerShell version:

Name Value


PSVersion 6.1.0
PSEdition Core
GitCommitId 6.1.0
OS Microsoft Windows 10.0.17763
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Modified settings (User):

{
    "breadcrumbs.enabled": true,
    "csharp.suppressHiddenDiagnostics": false,
    "docker.attachShellCommand.linuxContainer": "/bin/bash",
    "editor.fontFamily": "fira code retina medium",
    "editor.fontLigatures": true,
    "editor.renderControlCharacters": true,
    "editor.renderWhitespace": "all",
    "git.autofetch": true,
    "git.confirmSync": false,
    "git.enableSmartCommit": true,
    "git.fetchOnPull": true,
    "gitlens.heatmap.toggleMode": "window",
    "powershell.debugging.createTemporaryIntegratedConsole": true,
    "powershell.powerShellExePath": "C:\\Program Files\\PowerShell\\6\\pwsh.exe",
    "team.showWelcomeMessage": false,
    "terminal.integrated.shell.windows": "c:\\Program Files\\PowerShell\\6\\pwsh.exe",
    "vs-kubernetes": {
        "vs-kubernetes.minikube-path": "N:\\.vs-kubernetes\\tools\\minikube\\windows-amd64\\minikube.exe"
    },
    "window.zoomLevel": 0,
    "workbench.colorTheme": "Aurelia Dark+",
    "workbench.colorCustomizations": {
        "activityBarBadge.background": "#C6FF00",
        "list.activeSelectionForeground": "#C6FF00",
        "list.inactiveSelectionForeground": "#C6FF00",
        "list.highlightForeground": "#C6FF00",
        "scrollbarSlider.activeBackground": "#C6FF0050",
        "editorSuggestWidget.highlightForeground": "#C6FF00",
        "textLink.foreground": "#C6FF00",
        "progressBar.background": "#C6FF00",
        "pickerGroup.foreground": "#C6FF00",
        "tab.activeBorder": "#C6FF00",
        "notificationLink.foreground": "#C6FF00",
        "editorWidget.resizeBorder": "#C6FF00",
        "editorWidget.border": "#C6FF00",
        "settings.modifiedItemIndicator": "#C6FF00",
        "settings.headerForeground": "#C6FF00",
        "panelTitle.activeBorder": "#C6FF00",
        "breadcrumb.activeSelectionForeground": "#C6FF00",
        "menu.selectionForeground": "#C6FF00",
        "menubar.selectionForeground": "#C6FF00"
    }
}

Modified Settings (Folder):

{
    "powershell.codeFormatting.preset": "OTBS"
}
@LazerFX
Copy link
Author

LazerFX commented Jan 18, 2019

I just realised I'd already raised a bug-report in this repo for a previous issue (#1658 ) which may or may not be related... it's a completely different failure, but if there's an underlying problem it may be related.

@LazerFX
Copy link
Author

LazerFX commented Jan 18, 2019

I have identified the issue - this is a problem with VS Code Live Share - when I disable that extension, the problem goes away.

Not sure where to raise this - on that repo or here?

@TylerLeonhardt
Copy link
Member

@LazerFX is this what you're seeing:

microsoft/live-share#1216

@LazerFX
Copy link
Author

LazerFX commented Jan 18, 2019

It is indeed - already reported, thanks for the heads up. I missed that when searching, sorry for the inconvenience.

For those reading elsewhere, this is fixed in microsoft/vscode#61649 which will has a patch already in progress.

@LazerFX LazerFX closed this as completed Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants