Use VIM for python debug step such as Eclipse and PyDev

Is there a way to use vim to debug python programs and make it look / act like Eclipse with the PyDev plugin?

I mean:

  • Be able to debug it (is this the right term?)
  • see the state of all all variables as the program executes
  • be able to see where the debugging process is in the program - perhaps highlighting lines?

I know that Eclipse is a full-featured IDE, while VIM is a lightweight text editor (and each of them has its own set of functions), but I like working in the console because I have Windows 7 and usually use Ubuntu Virtualbox for training and working on python.

I did some research and found the following things, but none of them seem to do everything I want above:

  • in a python program let's say import pdb and then set a breakpoint in the code. It was line by line and did not allow me to see the state of variables
  • gdb and Clewn. I could not get this setting, so if this is my answer, just let me know and I will dig deeper.

If I misread the documents on any of the above, let me know and I will be back.

Thanks!

+6
source share
2 answers

My vote is for cleanliness, although I admit that I have not used it for python code. Just C code, C ++, but yes, it worked like a charm.

If I remember correctly, I even got this working, to some extent, on AIX 5.3 with dbx.

+1
source

pyclewn is a variant of clewn that was suggested by user sehe .

On the web page:

Pyclewn allows you to use vim as the front end of a debugger. Pyclewn currently supports gdb and pdb.

+2
source

Source: https://habr.com/ru/post/910563/


All Articles