Skip to content
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

Error on read command input #4851

Open
3 of 6 tasks
steve02081504 opened this issue Nov 30, 2023 · 1 comment
Open
3 of 6 tasks

Error on read command input #4851

steve02081504 opened this issue Nov 30, 2023 · 1 comment
Labels
Area-Extension Terminal Issue-Bug A bug to squash. Needs: Maintainer Attention Maintainer attention needed!

Comments

@steve02081504
Copy link

steve02081504 commented Nov 30, 2023

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

#4837

I am unable to use my profile in the vscode extension terminal because it will cause PSReadLine errors

PowerShell Version

~/Documents/workstation/esh e91e649@master >$PSVersionTable; $Host

Name                           Value
----                           -----
PSVersion                      7.4.0
PSEdition                      Core
GitCommitId                    7.4.0
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Name             : Visual Studio Code Host
Version          : 2023.8.0
InstanceId       : 6250413c-638c-4418-810f-b7fd28bd672e
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : zh-CN
CurrentUICulture : zh-CN
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

Visual Studio Code Version

~/Documents/workstation/esh e91e649@master >code --version
1.85.0-insider
2e721b6ec731c22cd3c2853dbc7ad69deb447515
x64

Extension Version

~/Documents/workstation/esh e91e649@master >code --list-extensions --show-versions | Select-String powershell

ms-vscode.powershell@2023.8.0

Steps to Reproduce

run this in vscode powershell extension host

$a=[System.Collections.ArrayList]@()
Add-Member -InputObject $a -MemberType ScriptMethod -Name Pop -Value {
	$value = $this[$this.Count-1]
	$this.RemoveAt($this.Count-1)
	$value
}
Register-EngineEvent PowerShell.OnIdle -Action {
	if($a.Count -gt 0) {
		$a.Pop().Invoke()
	}
}

then wait.

Visuals

图片

Logs

No response

@steve02081504 steve02081504 added Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed! labels Nov 30, 2023
@SydneyhSmith
Copy link
Collaborator

Thanks for the detailed info-- we will need to take a closer look and investigate

@SydneyhSmith SydneyhSmith added Area-Extension Terminal Needs: Maintainer Attention Maintainer attention needed! and removed Needs: Triage Maintainer attention needed! labels Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Extension Terminal Issue-Bug A bug to squash. Needs: Maintainer Attention Maintainer attention needed!
Projects
Status: Wishlist
Development

No branches or pull requests

2 participants