Is there any software that will allow me to generate trouble tickets (for Trac, Team Foundation Server, etc.) from TODO or otherwise annotated comments in the source code?
For Trac, there is a plugin called 'codetags' which provides a summary of encoded/tagged source comments without creating an actual ticket for each item.
Perhaps with some adaption or further extension, this plugin could help you create a ticket, or a batch of tickets based on tagged comments.
I've created a package for Atom Editor called imdone-atom that can create, update and close GitHub issues from TODO comments in your code. I'll be adding more integrations like Waffle.io, Jira and Phabricator and also a stand alone (non-atom) version soon.
Trac could be easily added if there is an open API.