Skip to content

Commit

Permalink
fix #4: make the debugger configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
obormot committed May 31, 2014
1 parent 8924b56 commit be29a10
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 3 additions & 5 deletions PythonBreakpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@
#############

pdb_block = """\
try: # do not edit! added by PythonBreakpoints
from ipdb import set_trace as _breakpoint
except ImportError:
from pdb import set_trace as _breakpoint
# do not edit! added by PythonBreakpoints
from %s import set_trace as _breakpoint
"""
""" % settings.get('debugger', 'pdb')

bp_regex = r"^[\t ]*_breakpoint\(\) # ([a-f0-9]{8})"
bp_re = re.compile(bp_regex, re.DOTALL)
Expand Down
5 changes: 4 additions & 1 deletion PythonBreakpoints.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
// preferred debugger (pdb, ipdb, pudb,..) - must support set_trace() call
"debugger": "pdb",

// "auto" (read from global settings), or a positive integer
"tab_size": "auto",

Expand All @@ -7,4 +10,4 @@

// auto-save the file on breakpoint toggle
"save_on_toggle": false
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Sublime Text Python Breakpoints
===============================

This is a [Sublime Text](http://www.sublimetext.com) plugin allowing to quickly set Python breakpoints by injecting [i]pdb.set_trace().
This is a [Sublime Text](http://www.sublimetext.com) plugin allowing to quickly set Python breakpoints by injecting set_trace() call of pdb or other debugger of your choice.

## Features

Expand Down

0 comments on commit be29a10

Please sign in to comment.