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
  • 9 years ago
  • 2 minutes ago
  • 11 years ago

Installs

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

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