Are there any ways to debug python scripts not leaving vim in *nix systems (executing the script, setting up breakpoints, showing variables in watch-list, etc)?
Use pdb:
import pdb def main(): list = [1,2,3] pdb.set_trace() list = [2,3,4] if __name__ == '__main__': main()
Now run using :!python % and you'll hit your breakpoint and be able to debug interactively like in gdb.
:!python %
2.1m questions
2.1m answers
60 comments
57.0k users