sponsor Vim development Vim logo Vim Book Ad

pybreak : Fast toggling of set_trace statement in python files, for easier debugging

 script karma  Rating 0/0, Downloaded by 111    Comments, bugs, improvements  Vim wiki

created by
Niklas Thörne
script type
Get the latest version from github: https://github.com/nthorne/vim-pybreak

Pybreak is a python filetype plugin for easily toggling set_trace statements, making it more convenient to debug python scripts. The following python filetype keymappings are provided:

* <localleader>d - inserts a set_trace statement after the cursor position if
  no statements (as inserted by pybreak) are found on the current line. _If_,
  however, any set_trace statements are found at the current line, they are
  removed, and no further set_trace statements are inserted.
* <localleader>D - as <localleader>d, with the minor difference that this
  keymapping inserts the set_trace statement _at_ the cursor position.
* <localleader>da - removes _all_ set_trace statements in the active buffer
* <localleader>de - toggles set_trace (see <localleader>d), writes the
  buffer to disk, and then executes the file with the python interpreter.

If the script does not work, make sure that the file being edited is recognized as a python file (set ft? returning filetype=python).

This script is released under the GNU General Public License v.3
install details
Preferred method of installation is to use pathogen (vimscript #2332). If you still want to install pybreak the old fashioned way, simply extract the tarball into your .vim directory.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
pybreak-1.1.tar.gz 1.1 2012-08-23 7.0 Niklas Thörne Corrected bug where line starting with ; could be inserted. Preserving indentation when first item on line.
pybreak-1.0.tar.gz 1.0 2012-08-22 7.0 Niklas Thörne Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo