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

Python Breakpoints

by obormot ST2/ST3 Trending

Sublime Text plugin to set Python breakpoints

Details

  • 2015.05.13.08.45.48
  • github.​com
  • github.​com
  • 4 years ago
  • 7 minutes ago
  • 5 years ago

Installs

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