Sublime, Python, web servers and checkpoints

What is the recommended method for debugging Python web servers (I have Plone / Zope) with Sublime Text 2?

  • Set real breakpoints in a text editor ...

  • ... preferably through a context-sensitive command and a marker in a text editor ...

  • ... then start a running Python web server (local process) instantly read breakpoints without rebooting ...

  • ... and when you hit the breakpoint, open the debug prompt in the terminal or in some other window, maybe pdb

The goal is that breakpoints would not be difficult import pdb ; pdb.set_trace()style breakpoints , since you need to restart the software to skip such a breakpoint, and you cannot enable / disable its runtime.

Platform: OSX.

+5
source share
1 answer

mr.freeze provides a way to set a breakpoint in a running Zope instance without restarting, and a sample script to integrate it with TextMate (launched via a key shortcut). It will take a little work to turn it into a Sublime Text plugin, but that would be a good starting point.

TextMate script examples in README , but not released.

+2
source

All Articles