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

Python Breakpoints

by obormot ALL

Sublime Text plugin to set Python breakpoints

Details

  • 2015.05.13.08.45.48
  • github.​com
  • github.​com
  • 5 years ago
  • 2 hours ago
  • 6 years ago

Installs

  • Total 45K
  • Win 23K
  • Mac 10K
  • Linux 12K
Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10
Windows 2 19 16 30 21 23 13 16 21 14 21 11 16 13 25 16 14 20 16 14 16 16 15 10 11 14 13 14 16 14 13 16 12 11 9 15 13 11 14 19 13 17 9 17 15 11
Mac 0 4 8 1 4 3 0 5 1 3 3 5 3 2 3 2 4 6 1 0 4 3 3 4 1 5 1 3 4 3 3 3 4 1 1 1 6 3 3 2 5 2 7 5 4 6
Linux 0 5 3 3 4 5 6 3 5 3 5 4 6 1 9 5 2 3 7 1 4 11 5 1 2 3 2 3 2 4 3 3 4 5 5 9 10 6 4 1 7 3 8 5 8 7

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