$Error '__Invoke-ReadLineForEditorServices' is not recognized as the name of a cmdlet
See original GitHub issueIssue 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
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® Core™ 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% |
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
VS Code debug '__Invoke-ReadLineForEditorServices' is not ...
How do I collapse sections of code in Visual Studio Code for Windows? 2 · powershell build-in function not recognized as the name...
Read more >VS Code debug '__Invoke-ReadLineForEditorServices' is not ...
[Solved]-VS Code debug '__Invoke-ReadLineForEditorServices' is not recognized-powershell ... This is an official bug, that is long known and not fixed yet.
Read more >Error (The term \<cmdlet name> is not recognized) when you ...
Describes an issue in which you receive an error message when you try to run Azure Active Directory Module for Windows PowerShell cmdlets....
Read more >How To Fix 'the term is not recognized as the name of a cmdlet ...
The error message, “the term is not recognized as the name of a cmdlet,” in PowerShell, is one such message. How to Solve...
Read more >Dealing with 'term is not recognized as the name of a cmdlet'
Missing modules. The third cause of this error is the failure to load a required module. In PowerShell, modules are collections of cmdlets...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found that defining a nothing function with the same name has eliminated the symptom for me.
function __Invoke-ReadLineForEditorServices {“”}
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.