SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
Just have a look at this link.This may help [Debug][1] [1]:… – SharePointHacker Feb 25 '14 at 9:56

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
share|improve this answer

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.

share|improve this answer
ya i have selected all w3wp.exe services – luckydeveloper Feb 25 '14 at 9:56

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!

share|improve this answer
Should't it be Automatic: Managed (v4.5, v4.0) code as it is VS 2012? – Nadeem Yousuf Feb 25 '14 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 Sharepoint Feb 25 '14 at 10:26

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?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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