Just a quick question. If you try to use the debugger, it executes a "SET log_min_messages TO fatal", which denies any regular user to debug his own functions. And actually, I don't see any reason why it should set log_min_messages. If there is, which is it?
When redesigning the debugger, I did not modify the existing connection settings without much thoughts.
After reading this mail, I couldn't agree more with you. It shouldn't be there.