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
155155
156156if ! pymode#Default (" g:pymode_breakpoint" , 1 ) || g: pymode_breakpoint
157157
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+
159160python << EOF
160161from 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
165169EOF
170+
166171 endif
167172
168173 " OPTION: g:pymode_breakpoint_key -- string. Key for set/unset breakpoint.
You can’t perform that action at this time.
0 commit comments