This short article explains the pgadmin plpgsql debugging storage procedure.
This article discusses checking bugs with code defect detection.