Run Python Debugger (pdb) in Sublime Text 3

ecoe picture ecoe · Mar 15, 2015 · Viewed 39.7k times · Source

How can you set python debugger (pdb) breakpoints in Sublime Text 3?

Both SublimeREPL or Python Breakpoints fail with default python build system:

print "hello"
# code runs fine without this breakpoint
import pdb; pdb.set_trace()
print "bye"

>>>File "C:\Python27\lib\bdb.py", line 49, in trace_dispatch
>>>return self.dispatch_line(frame)
    >>>File "C:\Python27\lib\bdb.py", line 68, in dispatch_line
    >>>if self.quitting: raise BdbQuit

Above issue appears documented, but with no obvious fix. Or has the answer been staring at me?

Answer

Rajaraman picture Rajaraman · Aug 17, 2016

python breakpoint plugin and check this link python breakpoint debugger

Use ctrl+shift+b to toggle breakpoint in a line

But its not preferable solution for debugging a software using a text editor. There are best IDE which makes your development lot easier

  • visual studio community edition

  • Pycharm

  • Eclipse

  • Komodo