# Debugging a deployed solution residing in a server farm

I have deployed a solution on the server farm, through the PowerShell. I wish to be able to debug the execution of a specific button residing in an application page found inside the specific solution, which I deployed and enabled on the server farm.

When I attach the Visual Studio to the w3wp.exe's found in the attach to process prompt, the breakpoints have a visible yellow warning sign. Hovering the mouse over the symbol, it tells that the breakpoints will be skipped.

I can't recall what am I doing wrong. Is there any setting which I need to arrange?

-
Are you building your .wsp in Release-mode? It is hard to debug if that is the case –  Robert Lindgren Nov 26 '13 at 15:42
no it is in debug configuration. –  user2987348 Nov 26 '13 at 15:45
And you are sure it is the latest code that are running? –  Robert Lindgren Nov 26 '13 at 15:46
Wait a minute, you are trying to debug it in Visual studio on the same server as the solution is deployed on, right? –  Robert Lindgren Nov 26 '13 at 15:48

Why would you debug a solution to SharePoint Server Farm, which I assume should be a Test, UAT or Production Farm (God forbid)??

You should have been debugging your solution in development environment. It's just doesn't make any sense when you have the tools such Visual Studio 2010 and onward versions to help you with debugging with simply a click of F5 (instead of PowerShell), right there in your development box!!

-

If you've deployed to the SharePoint server using a .wsp file (the normal way), you will need to move your .PDB file from your development machine to the SharePoint server where the code is running. This contains the symbols/debugging information and won't be included in the .wsp file.

You need to place the .pdb file alongside your .dll (i.e. in the same directory)

Also, you need to make sure the PDB and DLL are from the same compile, or else they won't match.

-

in visual studios, goto debug -> click on attach to process. when the popup appears click on -> "select" button, uncheck all appart from Managed (v2.0, v1.1, v1.0) code and click ok. now click on the bottom checkbox (show process for all sessions)

now goto the w3wp.exe and attach to process, make sure your attaching to the correct one! there could be several w3wp.exe dll's, if in dout click them all ;)

thats what mine looks like, i can debug just about anything ;) EDIT

i dont know about debugging aspx pages but .cs (the aspx code behind) you can, make sure also that the project is strongly named and is added to the gac or the bin folder:

bin folder: