The situation: Working on a virtual machine for SharePoint development. I'd like to debug the sandbox solution that I have received from our contractor. Usually I manually attach to the process by going to the debug menu > Attach to Process... > then selecting the process from the list. This has worked in the past. Attaching to the process stopped working about the time that I reverted from Visual Studio 2012 back to 2010 (older projects had issues in 2010).
The problem: Visual Studio gives an error, "Unable to attach to the process" when trying to attach to SPUCWorkProcess.exe that I need to debug a SharePoint sandbox solution.
Additional information:
System.Diagnostics.Debugger.Launch()
in the code isn't hit/doesn't react Given these details, I suspect that 1) available resources associated with my credentials are too small 2) something else is already attached to the process and crashing preventing me from attaching to it.
Solution was to provision a new virtual machine. My conclusion was that there is indeed a process running under my id (hence other people could attach to the process on the machine) preventing me from attaching to it again. I was never able to figure out how to detach any process already attached to it, if there ever was one at all. Hope this helps anyone else in some way. There appears to be very few solutions for "unable to attach to the process" that doesn't include forgetting to turn on the sandbox debugging.
User contributions licensed under CC BY-SA 3.0