To debug the plugin, use the command line. It will run for any conversion to EPUB, so you can put som eprint statements and run
Code:
any2epub testfile.html
and see what is happening.
The API for database access is defined in the class LibraryDatabase2, it will have all the methods you need.