Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions autoload/pymode/breakpoint.vim
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ fun! pymode#breakpoint#init() "{{{

from importlib.util import find_spec

for module in ('wdb', 'pudb', 'ipdb', 'pdb'):
if find_spec(module):
vim.command('let g:pymode_breakpoint_cmd = "import %s; %s.set_trace() # XXX BREAKPOINT"' % (module, module))
break
if sys.version_info >= (3, 7):
vim.command('let g:pymode_breakpoint_cmd = "breakpoint()"')

else:
for module in ('wdb', 'pudb', 'ipdb', 'pdb'):
if find_spec(module):
vim.command('let g:pymode_breakpoint_cmd = "import %s; %s.set_trace() # XXX BREAKPOINT"' % (module, module))
break
EOF
endif

Expand Down