0

Let's say I have a SharePoint web application running in my local machine. I want to debug a visual web part so that I can check what's wrong with my code. To start debugging I usually do the following steps:

  1. CMD: cd c:\windows\system32\inetsrv then appcmd list wp and I get the pid of my application pool
  2. Go to visual studio "Debug-> Attach to process..." and attach the process by the id I got in the step 1.
  3. Create my break point

Is there any way of making this process more efficient like, for instance, attaching the process without using the step 2?

1

You can do

  1. Debug -> Attach to Process

and select the process with name w3wp.exe. If there are multiple w3wp.exe then you should attach all of them.

In case of debugging timer jobs, you can attach process owstimer.exe

0

I use Debug -> Start Debugging and for Visual Web Parts at least Visual Studio deploys and then attaches without me having to do anything else. This doesn't work for timer jobs or event receivers though.

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.