ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Python Breakpoints

by obormot ST2/ST3

Sublime Text plugin to set Python breakpoints

Details

  • 2015.05.13.08.45.48
  • github.​com
  • github.​com
  • 3 years ago
  • 1 hour ago
  • 5 years ago

Installs

  • Total 35K
  • Win 17K
  • OS X 9K
  • Linux 10K
Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9
Windows 4 17 14 13 7 15 23 20 14 12 12 6 15 13 12 19 19 11 9 23 11 17 16 12 10 11 17 11 23 25 17 14 15 13 8 23 9 22 7 6 12 7 22 21 19 5
OS X 1 9 10 1 6 6 4 4 6 4 1 7 5 11 3 2 5 5 10 2 7 10 5 7 1 3 13 6 5 3 1 4 5 4 2 2 7 11 7 5 6 7 5 7 5 5
Linux 1 4 8 6 6 14 10 9 5 4 4 6 7 7 8 6 7 5 6 9 10 12 6 7 3 5 7 12 4 8 12 8 4 7 14 10 8 7 13 8 8 8 10 9 7 5

Readme

Source
raw.​githubusercontent.​com

Sublime Text Python Breakpoints

This is a Sublime Text plugin allowing to quickly set Python breakpoints by injecting set_trace() call of pdb or other debugger of your choice.

Features

  • breakpoint color highlighting, gutter icons
  • auto indentation, auto save on toggle (off by default, configurable)
  • your source file stores all breakpoints; plugin detects and recreates them on next load
  • support for user comments to help navigate among many breakpoints

Screenshot

Install

Through Package Control (recommended):

Command Palette > Package Control: Install Package > Python Breakpoints

From GitHub: Clone this repository into your version/platform specific Packages directory. Example for Mac and ST2 (note the space in the target directory name):

cd ~/Library/Application Support/Sublime Text 2/Packages
git clone https://github.com/obormot/PythonBreakpoints 'Python Breakpoints'

Usage

Command Palette > Python Breakpoints: ...

  • Toggle a breakpoint at current line (or ctrl+shift+b)
  • Goto a selected breakpoint (or ctrl+shift+g, or Menu > Goto > Goto Python Breakpoint...)
  • Clear All breakpoints in current file (or Menu > Tools > Breakpoints > Clear All Python Breakpoints)

If one or multiple lines of code are selected, the Toggle command will wrap the selected lines in a try-except statement and a new breakpoint will be added under the except: section.

Settings

Preferences > Package Settings > Python Breakpoints

Caveats

  • only space indentation is supported
  • in some code fragments the plugin may incorrectly indent the breakpoint; in such cases just use Indent/Unindent keyboard shortcuts to move it into desired position