This is cool, although I haven't used it so it will have to be a theoretical coolness.
A few months back Anders Karlsson posted a UDF and accompanying application for debugging stored procedures on sourceforge. The idea is that you can insert statements into your stored procedure for debugging purposes. The statements use a UDF that sends UDP messages to a debug server (provided with the UDF) to allow you to discover information about what is happening as your stored procedure is executed.