9

There are alternatives. Plain ol' pdb can be integrated into vim with vimpdb vebugger, etc (My own favourite) pudb can be integrated with pudb.vim vim-pudb And the popular ipdb can be integrated with vdebug ipdb_breakpoint


8

For me vimspector looks amazing, and has out-of-the-box Python support.


7

This is a coc.nvim setup procedure that works for Neovim, which aims to: Provide static type checking from a Python virtualenv (e.g. I have created a venv called coc with pyenv, which resides in ~/.pyenv/versions, I'll use this as an example). Format with black manually and automatically on save. So here is my setup procedure: Configure venv in coc-...


5

It seems that vim is waiting for another key to be pressed to continue. You can search for a mapping that use a<some_other_key> using the comand :map a and :imap = for the equal sign.


3

Vim :debug sessions are modal. When started we are prisoner of this non ergonomic mode. We could try to send anything we want to a buffer or a window, that window will never get refreshed and properly displayed. I guess Vim core would need to be multithreaded to support this, which is not the case. This issue was quickly mentioned during a poll on what ...


3

Even in v8.1, the short answer is no; you cannot positional-statically display the content of a variable without a plugin ... OR additional vim scripting. Alternatively However, Decho plugin does allow you to write info into another screen/buffer in a live manner using function calls. And DBGp is a debugger GUI for Vim debugging session (written in Python ...


3

In an extremely related Q/A, I've listed all the tools I provide and use to help tracking errors in vim scripts: https://vi.stackexchange.com/a/25863/626 They come in complement of :debug.


3

You could use that vimspector you have installed (in another instance of vim) to attach to the python process and get a stack trace. Debugpy supports attach-by-PID so you do something like this: python -m debugpy --listen localhost:5678 --pid <pid of the spinning process> Then use vimspector to attach to it, using the simple remote-attach config. You ...


2

gdb argument support is added at patch 8.0.1713: Termdebug [gdb-args] command command argument support is added at patch 8.0.1725: TermdebugCommand command [command-args] Additionally, once TermDebug is loaded you may also pass any command from Vim to GDB since patch 8.1.0071 using a function: call TermDebugSendCommand(gdb-command) Examples for each of ...


2

Try this instead: col('.') >= col('$') - 1 col('$') returns the number of the bytes in the cursor line plus one. Unless you have 'virtualedit' set, the cursor will never be in that position. (I'm using >= instead of == in case you do have 'virtualedit' set.) I'm not 100% sure what you mean by these tests, but you can find the documentation for col() ...


2

This will happen if you start editing the xxd-dumped version of the binary file, in which case Vim will assume a UTF-8 encoding (which you can confirm with :set fenc? returning fileencoding=utf-8). When you turn the file back into binary form, the character still looks correct (using ga on top of it shows <ÿ> 255, Hex 00ff, Oct 377, Digr y:), but that'...


2

Sorry I don't have a clear answer to your problem, but a few tricks that you could use instead. Typically, you could add the messages into a |List| and display them (the list) on demand. In my (complex) folding plugin for C&C++, I've used various techniques: balloons to display various information when the mouse is over a line signs to display in front ...


1

The solution was path_maps option in vdebug plugin: let g:vdebug_options = { 'path_maps': { 'D:\Dropbox': '/mnt/d/Dropbox' } } The code of how path_maps are parsed is located in util.py file of the plugin and reads (at the time of writing this post): 219 if opts.Options.isset('path_maps'): 1 sorted_path_maps = sorted( 2 ...


1

If using vimspector, you can set the python launch argument to point to the python interpreter that debugpy uses to debug your application. It's even in the example https://github.com/puremourning/vimspector#python


1

Put vimgrep matches in files from :scriptnames into the quickfix list Using :scriptnames allows to consider only files which have actually been sourced and then you can grep for the full and abbreviated option name (regex pattern) Steps vim demo.tex or do whatever you need to do to get to the point where you want to find out how you ended up with the ...


1

You could simply make shortcuts on python files that imports pdb and add a pdb.set_trace() etc. But I use PUDB (that is the same, but with syntax highlight and all good graphical stuff) with the command :term python -m pudb %. It basically opens a new split window with the debug, the call stack... I found that simple and convenient (and I remapped it on <...


1

Okay, so the startup log wasn't actually very helpful here. There wasn't really any indication in the log that this was the culprit, but it turns out it was vim-bundler. I actually didn't even paste the line for it, because its timestamps seemed so inconsequential, but: 20 048.261 001.317 001.317: sourcing /home/thomas/.vim/bundle/vim-bundler/plugin/...


1

As pointed out by Christian (all credits to him) in this comment, setting g:termdebugger does the trick. Put this into your .vimrc: let g:termdebugger='/path/to/your/gdb' Single quotes are needed.


1

It's documented at :h termdebug_shortcuts nnoremap ,u :call TermDebugSendCommand( printf( 'until %d', line('.') ) )<cr> update It's add at patch 8.1.0071 . Tons of bugs have been fixed since 8.0, update to 8.1 or 8.2 if you can. If you want to stay in 8.0, you can try to replace your termdebug.vim with master version, it's located at $VIMRUNTIME/...


1

As Christian Brabandt replied: :set signcolumn=no seems to solve the issue. Thanks!


1

I'm sure there are at least a few third party alternatives for this. One I'm familiar with is Decho which is used by netrw. You can enable/disable logging, indicate function enter/leave and depth and other useful things with any one of the following as the message destination: Appended to separate window Uses :echomsg Appended to a variable (default g:...


1

As @dedowsdi said in a comment: Log into a list. The following is derived from stuff I have in one of my plugins: function! DebugMsg(msg) abort if !exists("g:DebugMessages") let g:DebugMessages = [] endif call add(g:DebugMessages, a:msg) endfunction function! PrintDebugMsgs() abort if empty(get(g:, "DebugMessages", [])) echo "No ...


Only top voted, non community-wiki answers of a minimum length are eligible