Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Debugging Web Parts

  Asked By: Alexandria    Date: Jan 14    Category: Sharepoint    Views: 1332

I have VS.NET 2003 installed on my sharepoint server. I created a
simple webpart, and now am trying to debug it. I have followed the
directions on this page to debug it:

msdn.microsoft.com/.../en-
us/odc_sp2003_ta/html/sharepoint_debugwebparts.asp


When I drop the webpart on my page, it does not go back to Visual
Studio and my breakpoints.

"After attaching to the W3wp process, you can debug the code. To do
this, use Internet Explorer to open the test page that includes the
new
Web Part. As the page renders, the control switches to the Visual
Studio debugger (depending on the location of the break point). You
can
now use the debugging mode to check the Web Part functionality."

This does not happen.
It just stays on my wss site. Has anyone tried debugging webparts, or
know how to do them in the environment I mentioned??

Share: 

 

12 Answers Found

 
Answer #1    Answered By: Renee Murray     Answered On: Jan 14

Make sure your debug output path is the bin folder of the website you have deployed the part to.

Also note that there may be more than 1 w3wp process.. if there are you need to make sure you are attaching to the correct instance.

I am assuming you are doing this locally - I've never setup remote debugging.

 
Answer #2    Answered By: Harshini Raju     Answered On: Jan 14

I have the same problem. your tips is not working. can you tell me in
details about the Bin folder you have mentioned here.

 
Answer #3    Answered By: Christop Mcfadden     Answered On: Jan 14

Generally the bin folder is C:\inetpub\wwwroot\bin if you haven’t changed it.

Are you sure you attached to the right W3WP process?

Did you list the web  part in the Safe Controls?

Do not do a global install of the web part if you want to debug it.

Is the web part being added successfully or are you getting an error message? Are you sure that one of your break points should have run?

 
Answer #4    Answered By: Gopal Jamakhandi     Answered On: Jan 14

Here are my comments.

Generally the bin folder is C:\inetpub\wwwroot\bin if you haven’t changed it.
Ans: Iam attaching a document with the image of the bin folder. Please let me know your comments(Fig 1 in Debugwebpart.doc )

Are you sure you attached to the right W3WP process?
Ans: Iam attaching a document with the image of the Attaching W3WP process. Please let me know your comments(Fig 2 in Debugwebpart.doc )

Did you list the web  part in the Safe Controls?
Ans: Iam attaching a web config file available in the bin folder. Please let me know your comments
In web config file My safe control is listed as "FileNetSearchWP"

Do not do a global install of the web part if you want to debug it.
Ans: It don't have any idea about this. Please let me know where i have to check out to find out Whether t he web part installed global or not

Is the web part being added successfully or are you getting an error message? Are you sure that one of your break points should have run?
Ans: There is no error message while importing the web part file to the share point page.

 
Answer #5    Answered By: Chantal Rosa     Answered On: Jan 14

You can look at the Global Assembly Cache by going to Start Menu|Run and typing assembly. If your web  part assembly is listed in there, then it’s installed globally.

 
Answer #6    Answered By: Kyla Eckert     Answered On: Jan 14

yes. My assemblies are listed in the GAC. What i have to do now to get the debug working.

 
Answer #7    Answered By: Damon Garner     Answered On: Jan 14

ow iam able to debug the web  part after removing the assembly from the GAC.

 
Answer #8    Answered By: Alexis Ellis     Answered On: Jan 14

You’ll have to uninstall the web  parts from the GAC to be able to debug them. Remove them with STSADM then you can use STSADM to add the web part back – but this time don’t use the –globalinstall option.

 
Answer #9    Answered By: Percy Beach     Answered On: Jan 14

I did it. debug is working fine............

 
Answer #10    Answered By: Mary Adams     Answered On: Jan 14

I'm debugging  a web  part, I go to Debug---->Processes and sometimes I don't see w3wp process. I tried to get the process back by iisreset, restarting the computer, going to C:\WINDOWS\system32\inetsrv and clicking on w3wp.exe . Am I missing something that I don't see the process every time.

 
Answer #11    Answered By: Kyla Eckert     Answered On: Jan 14

I assume that u check the two check boxes at the bottom while attaching the process. And also start the debug screen after you have fired the url for ur web  part page. Else the w3p process may not show up.

And if nothing works then try to see the w3p process under the system process. If it lists there and not in VS IDE, then you know where the problem lies.

 
Answer #12    Answered By: Alyssa Butler     Answered On: Jan 14

The w3wp.exe process represents the application pool that is created
when you first browse to your SharePoint site. It expires after about 20
minutes. So, before you go to Debug --> Processes in VS.NET go to your
browser and refresh your SharePoint Web page and you should always see
the w3wp.exe process.

Be aware that you may see more than one w3wp.exe process. There will be
one for each active application pool (Central Administration is usually
in a different application pool) but there can also be more than one for
any given application pool, especially when you are debugging. This
usually happens because IIS encountered a threshold that dictates that
it recycle the application pool (common when debugging). If this happens
you can simply choose one of the processes and see if you picked right,
choose to attach to all of the w3wp.exe processes, or reset IIS and
refresh the browser and try to attach again.

 
Didn't find what you were looking for? Find more on Debugging Web Parts Or get search suggestion and latest updates.




Tagged: