Ubuntu Python debugging


Well having used Bash quite a bit, we finally got to the point with single stepping via a flag where it was pretty usable. Now with Sublime and Anaconda there is a good system for looking for autocomplete, definitions and for doing simpling linting¬† and you can use the Anaconda menu to find definitions. It also let’s you run test scripts, but what about single stepping. http://cewing.github.io/training.codefellows/assignments/day01/sublime_as_ide.html gives a nice list of packages to install into sublime. Im using sublime 3
The recommend using PDBSublimeTextSupport available via pip, this let’s you set a breakpoint and have it popup in Sublime so you can see the line and edit it. It uses https://docs.python.org/2/library/pdb.html (there is also a Python 3 version). It is pretty simple, you just import pdb; pbd.set_trace() to single step and then continue by typing a c
YOu can also set python breakpoints automagically with the packages https://packagecontrol.io/packages/SublimeREPL

Related Posts