Debugging SQL2005 Stored Procedures from VS2008

Yesterday I was having great success debugging T-SQL SP’s from VS2008 to a local developer SQL server. This was easy to do:

  • Enable SQL debugging in all my VS2008 projects (all of them was probably overkill, but it works)
  • Turn-off the local windows firewall (again overkill, but it works)
  • Create a connection to a database
  • Right click the SP | Open
  • Set a breakpoint.
  • Launch the app in debug mode.

All was good and this worked as expected without the need to create loads of PRINT statements and having all the power of the VS debugging tools.

…Then VS crashed… And it all stopped working. Totally stopped. Totally confused. No manner of reboots, resets, alterations to config made any difference.

After some considerable support from Microsoft the solution was to delete all the Program Debug Database (.pdb) files in the solutions and rebuild… and voila.

So the moral is – if VS crashes whilst debugging – delete the PDB’s – they might, just might, be corrupt and causing you a  whole world of pain.

Here endeth the lesson…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

A WordPress.com Website.

Up ↑

%d bloggers like this: