Thursday, November 19, 2009

Debugging the inline code of custom layout pages in SharePoint

I was trying to debug the application page I have design which contains inline code in it. I tried to attach the process to w3wp.exe process but any way the break point get couldn't catch the event.

Now, If you want to debug inline code for application pages in layout folder, Please follow the below steps:

Open the physical folder of that particular SharePoint web application. By default it will be in the following location C:\Inetpub\wwwroot\wss\VirtualDirectories\
  1. Open the web.config file from that folder and make debug="true" in the compilation tag.[<compilation batch="false" debug="true">]
  2. Now open the mycustom.aspx page in VS.NET IDE and in browser using the appropriate SharePoint site URL [http:///_layouts/mycustom.aspx]
  3. Attach the w3wp processor to the debugger and refresh the page in browser – now you can debug the inline code by puting a breakpoint.

I found on very cool article HERE.


No comments:

Post a Comment