weixin_39713841
weixin_39713841
2020-12-31 05:56

Can't write in Console window, not modifiable -- Python/debugpy on Neovim, Windows 10

When I try to edit the VimSpector.Console, I get a message from Neovim that it is non-modifiable.

Not sure if this is a bug or a limitation of Neovim, but need to work on the REPL during debugging...

  • Does your issue reproduce using vim -Nu /path/to/vimspector/support/minimal_vimrc ? No
  • If you are using Neovim, does your issue reproduce using Vim? No

List of steps to reproduce: On any break/pause into the code, the Console does not allow writing into it.

Use the following Vimspector config file:


{
  "configurations": {
    "Run without parameters": {
      "adapter": "debugpy",
      "configuration": {
        "justMyCode": false,
        "request": "launch",
        "python": "C:\\Users\\Gil\\Envs\\utils\\Scripts\\python3.exe",
        /* "stopOnEntry": true, */
        "debugOptions": [],
        "program": "${file}"
      }
    },
    "With Autorun, Amount 10, and PySimpleNoGUI": {
      "adapter": "debugpy",
      "configuration": {
        /* "justMyCode": false, */
        "request": "launch",
        "python": "C:\\Users\\Gil\\Envs\\utils\\Scripts\\python3.exe",
        /* "stopOnEntry": true, */
        "debugOptions": [],
        "program": [
          "${file}",
          "-t"
        ] 
      }
    }
  }
}

On Vim the Console is modifiable and all seem to work fine. Problem occurs only in Neovim. The Console is not editable (modifiable). Vimspector log (~/.vimspector.log):


2020-12-22 05:54:42,856 - INFO - **** INITIALISING NEW VIMSPECTOR SESSION ****
2020-12-22 05:54:42,856 - INFO - API is: 
2020-12-22 05:54:42,856 - INFO - VIMSPECTOR_HOME = C:\Users\Gil\.vim\plugged\vimspector
2020-12-22 05:54:42,857 - INFO - gadgetDir = C:\Users\Gil\.vim\plugged\vimspector\gadgets\windows

Environemnt

This is in Windows 10 with Neovim.

  • Version of Vimspector: (e.g. output of git rev-parse HEAD if cloned or the

(utils) C:\Users\Gil\.vim\plugged\vimspector>git rev-parse HEAD
8e2d352eb8958693ea2021f7f43ae0418dcb083b
  • Output of vim --version or nvim --version

NVIM v0.4.4
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe /DWIN32 /D_WINDOWS /W3 /MD /Zi /O2 /Ob1 /DNDEBUG -DMIN_LOG_LEVEL=3 /W3 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -D_WIN32_WINNT=0x0600 -DINCLUDE_GENERATED_DECLARATIONS -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -IC:/projects/neovim/build/config -IC:/projects/neovim/src -IC:/projects/nvim-deps/usr/include -IC:/projects/neovim/build/src/nvim/auto -IC:/projects/neovim/build/include
Compiled by appveyor-WIN

Features: -acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM\sysinit.vim"
  fall-back for $VIM: "C:/Program Files/nvim/share/nvim"

Run :checkhealth for more info


health#coc#check
========================================================================
  - OK: Environment check passed

  - OK: Javascript bundle build/index.js found
  - OK: Service started

health#nvim#check
========================================================================
## Configuration
  - OK: no issues found

## Performance
  - OK: Build type: RelWithDebInfo
    LuaJIT

## Remote Plugins
  - OK: Up to date

health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: win32yank

## Python 2 provider (optional)
  - INFO: pyenv: Path: c:\Users\Gil\pyenv.CMD
  - INFO: pyenv: $PYENV_ROOT is not set. Infer from `pyenv root`.
  - WARNING: pyenv: Root does not exist: . Ignoring pyenv for all following checks.
  - WARNING: No Python executable found that can `import neovim`. Using the first available executable for diagnostics.
  - ERROR: Python provider error:
    - ADVICE:
      - provider/pythonx: Could not load Python 2:
          python2 not found in search path or not executable.
          python2.7 not found in search path or not executable.
          python2.6 not found in search path or not executable.
          C:\Users\Gil\Envs\utils\Scripts\python.EXE is Python 3.9 and cannot provide Python 2.
  - INFO: Executable: Not found

## Python 3 provider (optional)
  - INFO: pyenv: Path: c:\Users\Gil\pyenv.CMD
  - INFO: pyenv: $PYENV_ROOT is not set. Infer from `pyenv root`.
  - WARNING: pyenv: Root does not exist: . Ignoring pyenv for all following checks.
  - INFO: Using: g:python3_host_prog = "C:\Users\Gil\Envs\utils\Scripts\python.exe"
  - INFO: Executable: C:\Users\Gil\Envs\utils\Scripts\python.exe
  - INFO: Python version: 3.9.1
  - INFO: pynvim version: 0.4.2
  - OK: Latest pynvim is installed.

## Ruby provider (optional)
  - WARNING: `ruby` and `gem` must be in $PATH.
    - ADVICE:
      - Install Ruby and verify that `ruby` and `gem` commands work.

## Node.js provider (optional)
  - INFO: Node.js: v14.15.1
  - INFO: Neovim node.js host: C:\Users\Gil\AppData\Roaming\npm\node_modules/neovim/bin/cli.js
  - OK: Latest "neovim" npm/yarn package is installed: 4.9.0
  • Output of which vim or which nvim:

C:\Program Files\Neovim\bin\nvim.exe
  • Output of :py3 print( __import__( 'sys' ).version ):

3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]
  • Output of :py3 import vim:

3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]
  • Output of :py3 import vimspector:

  • For neovim: output of :checkhealth

see above
  • Operating system: Windows 10

Declaration

Additional information

Add any other context about the problem here.

该提问来源于开源项目:puremourning/vimspector

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

6条回答

相关推荐