Skip to content

Commit be29a10

Browse files
committed
fix #4: make the debugger configurable
1 parent 8924b56 commit be29a10

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

PythonBreakpoints.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,11 @@
3333
#############
3434

3535
pdb_block = """\
36-
try: # do not edit! added by PythonBreakpoints
37-
from ipdb import set_trace as _breakpoint
38-
except ImportError:
39-
from pdb import set_trace as _breakpoint
36+
# do not edit! added by PythonBreakpoints
37+
from %s import set_trace as _breakpoint
4038
4139
42-
"""
40+
""" % settings.get('debugger', 'pdb')
4341

4442
bp_regex = r"^[\t ]*_breakpoint\(\) # ([a-f0-9]{8})"
4543
bp_re = re.compile(bp_regex, re.DOTALL)

PythonBreakpoints.sublime-settings

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
// preferred debugger (pdb, ipdb, pudb,..) - must support set_trace() call
3+
"debugger": "pdb",
4+
25
// "auto" (read from global settings), or a positive integer
36
"tab_size": "auto",
47

@@ -7,4 +10,4 @@
710

811
// auto-save the file on breakpoint toggle
912
"save_on_toggle": false
10-
}
13+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Sublime Text Python Breakpoints
22
===============================
33

4-
This is a [Sublime Text](http://www.sublimetext.com) plugin allowing to quickly set Python breakpoints by injecting [i]pdb.set_trace().
4+
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.
55

66
## Features
77

0 commit comments

Comments
 (0)