PowerShell / PowerShell/vscode-powershell

not using the Legacy Psreadline experience leads to "custom key handler"-error

Open
#4,196 17 comments 1 reaction 1 assignee View on GitHub

@andyleejordan is already working on this.

Since Oct 10, 2022.

Area-PSReadLine Bug: PowerShell 5.1 Issue-Bug
Dominant language
TypeScript
Stars
1.9k
Forks
547
PR merge metrics
No merged PRs in 30d

Description

Type: Bug

Install PSReadline v2.2.6
Use VsCode
Use PowerShell or PowerShellPreview
Use PowerShell Extension terminal session that is opened to you

[2022-10-02 11:09:22]❯ get-moduleAn exception occurred in custom key handler, see $error for more information: Object reference not set to an instance of an object.

No command I enter (incl. $Error[0].Exception) leads anywhere.

If I then disable the live PSreadline experience (i.e. switch on the "legacy PSreadline experience" in the settings and restart the terminal session, it works fine.

Problem #1) - I can't close the terminal session as it de-facto disables the extensions
Problem #2) - I can't use it in legacy mode as most of the PsReadLine goodies do not work anymore
Problem #3) - I can't use it in normal operation mode

What can be done here?
Anything else I can do to troubleshoot this?

Extension version: 2022.9.2
VS Code version: Code 1.71.2 (74b1f979648cc44d385a2286793c226e611f59e7, 2022-09-14T21:03:37.738Z)
OS version: Windows_NT x64 10.0.22623
Modes:
Sandboxed: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 x 3600)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 31.93GB (19.83GB free)
Process Argv --crash-reporter-id efc3d77d-4b9d-44d6-894f-bd5aee3260eb
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscorecescf:30445987
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30557514
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyone:30548225
2144e591:30553903
i5d37513:30580093
pyindex848:30577860
fc301958:30573243

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.