In a debug build, I believe that we always show the SQL. In a release build, there is a config flag "show_sql".