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