title: What is the best way to debug stored procedures (and write sprocs that are easier to debug)?
body: <p>What are good methodologies for creating sprocs that reduce the pain of debugging? And what tools are out there for debugging stored procedures?</p>
  
  <p>Perhaps most importantly, what are indications to look out for that errors are happening in a sproc and not in the code? I hope I'm not all over the board too terribly bad here. Votes for answers to any of the above. Thanks.</p>
  
  <p>For what it's worth, I work in a .NET environment, SQL servers.</p>