How do I avoid the maintenance screen on database errors? As I'm working on a D7 site, I'll occasionally hit a database-related bug in my code. When this happens, I get thrown to a version of my site's maintenance page; the error information doesn't show up on the page, but just in Watchdog. This makes sense for a production site, but it's a pain during development. Is there any way to turn this behavior off, so that the error messages show up on the page I'm working on? Thanks!
If you have a serious / fatal database error, you're probably not seeing the 'maintenance page' but the db_offline page which usually displays errors direct to screen. What kinds of database errors are you experiencing?

Assuming your site is not in maintenance mode, few things you can check and set:


Check the settings under admin/config/development/logging and make sure you have it set to display 'all messages' 
Make sure you have php set to display errors -- you can add the following in your settings.php file to increase your error_reporting level: 




error_reporting(-1);
$conf['error_level'] = 2;
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);