Vdebug calculates source window incorrectly in Neovim
See original GitHub issueWhen using neovim and trying to debug something that’s further away from the first windows, it breaks the layout, or even throws an exception. Here I had 6 tabs opened and 7th was my source file with breakpoint: Vim:
- [Info] {Sat 07 2017 12:58:28} Searching for win by name /home/vagrant/test.php
- [Info] {Sat 07 2017 12:58:28} Win 1, name /home/vagrant/test.php
- [Info] {Sat 07 2017 12:58:28} Returning window number 1
- [Info] {Sat 07 2017 12:58:28} Found window 1, activating
- [Info] {Sat 07 2017 12:58:28} Found connection from ('127.0.0.1', 37240)
....
Neovim:
- [Info] {Sat 07 2017 12:52:22} Searching for win by name /home/vagrant/test.php
- [Info] {Sat 07 2017 12:52:22} Win 1, name
- [Info] {Sat 07 2017 12:52:22} Win 2, name
- [Info] {Sat 07 2017 12:52:22} Win 3, name
- [Info] {Sat 07 2017 12:52:22} Win 4, name
- [Info] {Sat 07 2017 12:52:22} Win 5, name
- [Info] {Sat 07 2017 12:52:22} Win 6, name
- [Info] {Sat 07 2017 12:52:22} Win 7, name /home/vagrant/test.php
- [Info] {Sat 07 2017 12:52:22} Returning window number 7
- [Info] {Sat 07 2017 12:52:22} Found window 7, activating
- [Info] {Sat 07 2017 12:52:22} Closing the connection
- [Debug] {Sat 07 2017 12:52:22} Command: stop -i 1
- [Debug] {Sat 07 2017 12:52:22} Response: <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stop" transaction_id="1" status="stopped" reason="ok"></response>
- [Debug] {Sat 07 2017 12:52:22} Closing the socket
- [ERROR] {Sat 07 2017 12:52:22} An error occured: <class 'neovim.api.nvim.NvimError'>
Traceback (most recent call last):
File "/home/vagrant/.vim/bundle/vdebug/plugin/python/start_vdebug.py", line 31, in run
self.runner.run()
File "/home/vagrant/.vim/vdebug/plugin/python/vdebug/runner.py", line 184, in run
self.open()
File "/home/vagrant/.vim/vdebug/plugin/python/vdebug/runner.py", line 48, in open
self.ui.open()
File "/home/vagrant/.vim/vdebug/plugin/python/vdebug/ui/vimui.py", line 80, in open
raise e
NvimError: Vim(wincmd):E16: Invalid range
It seems that vim-python manages windows differently in vim and neovim. In vim it is managed by-tab, in neovim it is managed globally
vim -c "vsplit" -c "tabnew" -c "py import vim"
:py print len(vim.windows)
Vim outputs 1 Neovim outputs 3
I hacked some sort of a PR, maybe you have more sophisticated idea what is going on and how to fix better.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Options - Neovim docs
Some of the options only apply to a window or buffer. ... There is no need to set the 'makeprg' option in the...
Read more >Debugging in Vim – Daniel's Assorted Musings
The editor window on the right—with the corresponding source code—will show breakpoints and highlight lines when stepping through a program.
Read more >User Manual - rust-analyzer
If rust-analyzer is not detected, Corrosion will prompt you for configuration of your Rust toolchain and language server with a link to the...
Read more >Neovim 0.5 is overpowering - Hacker News
My issue with all of these relative jump points, repeat this N times, etc of VIM is by the time I've calculated in...
Read more >Debugging In Neovim (ft BashBunni) - YouTube
Today we use the wonderful nvim -dap to debug and work with #golang and explore different debugging possiblities INSIDE of neovim.
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 Free
Top 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

@reafle Thanks for your fork, this solves this both issue for me and another issue I was having whereby vdebug only worked if you only had a single window open in neovim - if you had more than one window (or split) then the layout would go weird and be pretty much unusable. So thanks!
added in v2-integration, thanks