4

I have developed a simple visual webpart for SharePoint 2013 in Visual Studio 2012. The .apsx page only has one label. Then I say deploy and attach to process w3wp and refresh the webpage where I have added the visual webpart. In the code I have put breakpoints at the start on oninit() and pageload() methods. But, when I refresh the page, I find the label. However, the code behind does not run and the breakpoints are not hit. When I hover over the break points I get following message. enter image description here

1

4 Answers 4

3

If its your development environment, try IISReset.. Also if that doesn't work, restart SharePoint Timer Job..

You can restart SPTimerV4 service for restarting SharePoint Timer Job, write following in Command Prompt:

net stop SPTimerV4
net start SPTimerV4
1

Apart form doing IISRESET, make sure that you are attaching to all w3wp.exe instances. Click on Show processes from all users checkbox and attach to all w3wp.exe services.

1
  • ya i have selected all w3wp.exe services Feb 25, 2014 at 9:56
0

several things here!

one make sure that your building the debug dll and not the release dll.

2, when attaching:

goto -> debug -> attach to process -> click on select button and uncheck all appart from "managed (v2.0, v1.1, v1.0) code".

and click ok, now look towards the bottom and select "show processes from all users" and "show processes in all sessions"

now within the white box you can scroll down to the w3wp processes and select them all to attach. This works for me!

2
  • Should't it be Automatic: Managed (v4.5, v4.0) code as it is VS 2012? Feb 25, 2014 at 10:24
  • yup depends on what version of sharepoint he is using? i just presumed 2010. Your right if he is using 2013!
    – Ali Jafer
    Feb 25, 2014 at 10:26
0

Are you sure you're attaching to the right w3wp process? Its identity should match the app pool identity for the web application to which you are deploying. (Are you deploying to the same web app from Visual Studio that you are attaching to?)

Any reason you aren't just hitting F5 to deploy and attach automatically?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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