File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -155,14 +155,19 @@ endif
155
155
156
156
if ! pymode#Default (" g:pymode_breakpoint" , 1 ) || g: pymode_breakpoint
157
157
158
- if ! pymode#Default (" g:pymode_breakpoint_cmd" , " import ipdb; ipdb.set_trace() # XXX BREAKPOINT" ) && has (" python" )
158
+ if ! pymode#Default (" g:pymode_breakpoint_cmd" , " import pdb; pdb.set_trace() # XXX BREAKPOINT" ) && has (" python" )
159
+
159
160
python << EOF
160
161
from imp import find_module
161
- try :
162
- find_module (' ipdb' )
163
- except ImportError:
164
- vim .command (' let g:pymode_breakpoint_cmd = "import pdb; pdb.set_trace() # XXX BREAKPOINT"' )
162
+
163
+ for module in (' pudb' , ' ipdb' ):
164
+ try :
165
+ find_module (module)
166
+ vim .command (' let g:pymode_breakpoint_cmd = "import %s; %s.set_trace() # XXX BREAKPOINT"' % (module, module))
167
+ except ImportError:
168
+ continue
165
169
EOF
170
+
166
171
endif
167
172
168
173
" OPTION: g:pymode_breakpoint_key -- string. Key for set/unset breakpoint.
You can’t perform that action at this time.
0 commit comments