0

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?

4
  • Are you building your .wsp in Release-mode? It is hard to debug if that is the case Nov 26 '13 at 15:42
  • no it is in debug configuration. Nov 26 '13 at 15:45
  • And you are sure it is the latest code that are running? 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? Nov 26 '13 at 15:48
2

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!!

1

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.

0

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 ;)

enter image description here

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:

C:\inetpub\wwwroot\wss\VirtualDirectories\your webapp name here\bin

or gac

C:\Windows\assembly

the symbol should become a solid red when debugging the .cs file!

5
  • thanks, though the same output :/. Is it supposed that one of the w3wp.exe has to have to be an IISAPPPOOL? as iv seen different printscreen and several hadd that process. On the other hand mine doesnt. Nov 26 '13 at 15:35
  • what version of sharepoint are you using and what version of vs are you using?
    – Ali Jafer
    Nov 26 '13 at 15:37
  • my Visual studio and share point are both 2010 version Nov 26 '13 at 15:43
  • when you deploy do you do it using the debug version or the release version of the dll? as you need to do the debug version to debug
    – Ali Jafer
    Nov 26 '13 at 15:49
  • just ammended my answer
    – Ali Jafer
    Nov 26 '13 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.