Very quick tip for anyone who uses Sublime Text Editor. Below is a key-binding entry for setting ctrl+p to insert "import pdb; pdb.set_trace()" and new line where the cursor currently is. For those unfamiliar with pdb, it is the Python Debugger and this line will first import it then set the trace point, meaning when the script is next ran, pdb will be invoked at that point.
You will need to paste this into "Preferences -> Key Bindings - User"
For further information to pdb, would strongly suggest to watch this video: http://pyvideo.org/video/644/introduction-to-pdb and to start incorporating it in your development toolkit.
No comments:
Post a Comment