I have a SharePoint 2010 site deployed using Visual Studio 2010. An application page on the site contains an ascx control that includes a FileUpload control. When I am attached to the W3WP process and hit the FileUpload control, the button, and the OnClick event fires the debugger stops and returns me back to Visual Studio 2010. Any thoughts as to why this might be occurring?
I would check the ULS logs. Located at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\logs I use this ULS viewer http://sharepointlogviewer.codeplex.com/
Other possibility may be the latest code is not in the GAC. Redeploy
And sometimes I have had it where the attach to debugger just stops working and I have had to use F5 and wait for it to deploy