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
  • 5 years ago
  • 48 minutes ago
  • 6 years ago

Installs

  • Total 43K
  • Win 22K
  • OS X 10K
  • Linux 11K
Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 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
Windows 4 11 17 11 18 21 10 8 18 24 19 19 18 14 5 16 15 21 10 21 22 10 8 14 19 14 11 17 15 11 12 17 17 9 18 8 8 18 16 19 17 15 10 11 13 19
OS X 3 3 5 4 3 5 3 4 3 2 4 1 4 6 2 3 3 9 2 3 8 2 3 4 5 3 4 2 2 8 3 7 4 4 4 1 5 4 6 7 2 1 1 5 3 5
Linux 1 6 5 10 6 7 1 5 2 3 12 5 8 9 6 12 7 5 9 3 3 4 3 10 4 6 2 5 2 4 7 6 5 4 1 4 5 7 7 6 3 5 3 4 5 8

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