odedbd / PythonBreakpoints

Sublime Text plugin to set Python breakpoints

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Sublime Text plugin to set Python breakpoints


Languages

Language:Python 100.0%