I often get the errors:
Msg 208, Level 16, State 0, Line 1
Invalid object name '#foo'.
Msg 3701, Level 11, State 5, Line 1
Cannot drop the table '#foo', because it does not exist in the system catalog.
How do I know what temporary tables there are in scope? They obviosly don't show up in SSMS like base tables do.