views:

19

answers:

2

I am having trouble getting Visual Studio 2008 remote debugger to hit break points.

I have two VMWare virtual machines.

One hosts the SharePoint MOSS 2007 Shared Services and Central Admin and has Visual Studio 2008 Professional on it as well. I am using WSPBuilder to structure and deploy my web part.

The other machine is a Web Front End and I have copied the remote debugging folder to C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger and started up the Remote Debugging Monitor.

From Visual Studio I created the basic WSPBuilder project and add a Web Part Feature with the default "Hello SharePoint" code and then Deploy using the WSPBuilder menu, activate it at the site level and add it to a test SharePoint page.

From Visual Studio I attach to the w3wp.exp located on the Web Front End where I can see the Remote Debugger Monitor telling me it successfully connected.

Now no matter what I do VS Does not stop at the breakpoint. Furthermore the breakpoint icon displays the message "The Break Point will not be hit. No symbols have been loaded for this document."

In this scenario where is the Where does the .pdb load from? What must I do to get it to load the .pdb file successfully?

Thanks for the help.

A: 

The assemblies deployed by WSPBuilder are built in Release mode and do not contain debugging symbols. In order to load the debugging symbols, you need to build the solution/projects in debug mode and overwrite the assemblies in the bin/GAC within the vm. The debug assemblies can be found in your visual studio project's folder under bin/Debug.

If you're having problems overwriting the GAC assemblies, temporarily stop the Application Pool associated with the SharePoint site.

Hope this helps!

Dylan Berry
A: 

For managed code debugging, VS2008 looks for symbols on the remote machine rather than the local box. So your PDB's have to be accessible to the msvsmon.exe instance running on the Web Front end box (either via a share, or by copying the PDBs over to that machine).

Abhijit Rao
Note, msvsmon.exe == Remote debugging monitor
Abhijit Rao