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 '__Invoke-ReadLineForEditorServices' is not recognized as the name of a cmdlet #2767

Closed
ili101 opened this issue Jun 14, 2020 · 8 comments
Labels
Resolution-Duplicate Will close automatically.

Comments

@ili101
Copy link

ili101 commented Jun 14, 2020

Issue Type: Bug

When using the debugger the $Error variable get filled with records of the error:

ErrorRecord                 : The term '__Invoke-ReadLineForEditorServices' 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.
CommandName                 : __Invoke-ReadLineForEditorServices
WasThrownFromThrowStatement : False
TargetSite                  : System.Collections.ObjectModel.Collection`1[System.Management.Automation.PSObject] Invoke(System.Collections.IEnumerable)
StackTrace                  :    at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
                                 at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
                                 at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output,
                              PSInvocationSettings settings)
                                 at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output,
                              PSInvocationSettings settings)
                                 at System.Management.Automation.PowerShell.Invoke[T](IEnumerable input, IList`1 output, PSInvocationSettings settings)
                                 at System.Management.Automation.PowerShell.InvokeWithDebugger(IEnumerable`1 input, IList`1 output, PSInvocationSettings settings,
                              Boolean invokeMustRun)
                                 at System.Management.Automation.ScriptDebugger.ProcessCommand(PSCommand command, PSDataCollection`1 output)
                                 at Microsoft.PowerShell.EditorServices.Services.PowerShellContext.PowerShell5Operations.ExecuteCommandInDebugger[TResult](PowerShellConte
                              xtService powerShellContext, Runspace currentRunspace, PSCommand psCommand, Boolean sendOutputToHost, Nullable`1& debuggerResumeAction) in
                              D:\a\1\s\src\PowerShellEditorServices\Services\PowerShellContext\Session\PowerShell5Operations.cs:line 61
                                 at Microsoft.PowerShell.EditorServices.Services.PowerShellContextService.ExecuteCommandInDebugger[TResult](PSCommand psCommand, Boolean
                              sendOutputToHost) in D:\a\1\s\src\PowerShellEditorServices\Services\PowerShellContext\PowerShellContextService.cs:line 1955
                                 at Microsoft.PowerShell.EditorServices.Services.PowerShellContextService.ExecuteCommandAsync[TResult](PSCommand psCommand, StringBuilder
                              errorMessages, ExecutionOptions executionOptions) in
                              D:\a\1\s\src\PowerShellEditorServices\Services\PowerShellContext\PowerShellContextService.cs:line 713
Message                     : The term '__Invoke-ReadLineForEditorServices' 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.
Data                        : {}
InnerException              :
HelpLink                    :
Source                      : System.Management.Automation
HResult                     : -2146233087

Can lead to unexpected behavior when using $Error[0] or Get-Error -Newest 1 and getting different results when using the debugger or not

Error
1592142049-f665f186-1ae9-4187-89fd-2a5a00a5d59b1592141717209.zip

Extension version: 2020.6.1
VS Code version: Code 1.46.0 (a5d1cc28bb5da32ec67e86cc50f84c67cc690321, 2020-06-10T09:03:20.462Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (2 x 3392)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: disabled_off
oop_rasterization: unavailable_off
protected_video_decode: unavailable_off
rasterization: unavailable_off
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 2.00GB (0.22GB free)
Process Argv
Screen Reader no
VM 100%
@ghost ghost added the Needs: Triage Maintainer attention needed! label Jun 14, 2020
@SydneyhSmith
Copy link
Collaborator

Thanks @ili101 for the detailed information, we agree that this is an issue--I will mark this as a duplicate of PowerShell/PowerShellEditorServices#1296

@SydneyhSmith SydneyhSmith added Resolution-Duplicate Will close automatically. and removed Needs: Triage Maintainer attention needed! labels Jun 18, 2020
@ghost
Copy link

ghost commented Jun 19, 2020

This issue has been marked as duplicate and has not had any activity for 1 day. It has been closed for housekeeping purposes.

@mono808
Copy link

mono808 commented Sep 29, 2020

still getting the $error array filled with this error in vs code debugger. no solution yet?

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Sep 29, 2020
@SydneyhSmith
Copy link
Collaborator

SydneyhSmith commented Sep 29, 2020

@mono808 you can track the progress of this work with this issue PowerShell/PowerShellEditorServices#1295

@Kupferschmid
Copy link

$Error '__Invoke-ReadLineForEditorServices' Issue still exists!

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Oct 27, 2020
@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label Dec 8, 2020
@cvillegashak
Copy link

Issue still exists.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Dec 28, 2020
@corbob
Copy link
Contributor

corbob commented Dec 29, 2020

To any in the future that may find this issue due to searching the error: If PowerShell/PowerShellEditorServices#1295 is still open, then this issue will exist. It is unfortunate, but there is currently nothing that can be done in this issue, so commenting that it still exists does little to resolve the issue.

@TysonP
Copy link

TysonP commented Mar 17, 2021

I found that defining a nothing function with the same name has eliminated the symptom for me.

function __Invoke-ReadLineForEditorServices {""}

@SydneyhSmith SydneyhSmith removed the Needs: Maintainer Attention Maintainer attention needed! label May 18, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate Will close automatically.
Projects
None yet
Development

No branches or pull requests

7 participants