27.01.2015 Views

Best Practices of Plone Development

Best Practices of Plone Development

Best Practices of Plone Development

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1.9 Debugging 1 BEST PRACTICES FOR PLONE DEVELOPMENT<br />

1.9.4 Dropping to PDB Manually<br />

• Run Zope in foreground mode<br />

– zopectl fg<br />

• Drop into pdb at right place:<br />

import pdb<br />

pdb.set_trace()<br />

1.9.5 PDB in 3 Minutes<br />

• h: help<br />

• s: step, n: next<br />

• r: return, c: continue<br />

• w: frames<br />

1.9.6 PDB in 3 Minutes (2)<br />

• l: list<br />

• p: print, pp: pretty-print, whatis: what-is-object<br />

• b: breakpoint:<br />

b [file]:lineno | [obj.]function [, condition]<br />

42

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!