You can debug a DLL just like any other application in Visual Studio. All you have to do is tell Studio what executable will load the dll and you'll be able to debug from there. Here's a description:
http://msdn.microsoft.com/en-us/library/605a12zt%28v=VS.90%29.aspx[
^]
If you debug in this manner, you'll have all Studio's debug capabilities available to you (breakpoints, TRACE statements, output window, etc.).