27.01.2015 Views

Best Practices of Plone Development

Best Practices of Plone Development

Best Practices of Plone Development

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

1.9 Debugging<br />

1.9.1 Error Log<br />

• Location for details on error messages<br />

• Accessible through <strong>Plone</strong> interface (also in ZMI)<br />

• While developing, remove Unauthorized and NotFound filters<br />

1.9.2 Output Debugging<br />

• print "foo=%s" % value<br />

• plone_log(summary, text)<br />

• raise "foo!", values<br />

– Shows & stores REQUEST obj<br />

– Can make conditional on someting in request<br />

1.9.3 Limitations <strong>of</strong> Output Debugging<br />

• Output statements in many places<br />

– Have to go back and clean up later<br />

• Few “aha!” moments<br />

41

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

Saved successfully!

Ooh no, something went wrong!