开发者

Debugging Sitecore 6 with Visual Studio 2008

开发者 https://www.devze.com 2023-01-09 04:58 出处:网络
I\'m trying to debug Sitecore 6 ASP.NET code using Visual Studio 2008 (Windows Server 2003 OS). I am trying to get breakpoints to work.I tried setting the breakpoint and then on VS, debug -> attach

I'm trying to debug Sitecore 6 ASP.NET code using Visual Studio 2008 (Windows Server 2003 OS). I am trying to get breakpoints to work. I tried setting the breakpoint and then on VS, debug -> attach to process.. -> IIS web server pro开发者_Python百科cess, but nothing happens when I browse to a certain .aspx page where a breakpoint is located at the beginning of the Sitecore.Web.UI.WebControl.DoRender method.

I tried checking both client-side and server-side debugging settings on the website's properties -> configuration -> debugging but nothing changes. I tried stopping the website, recycling the appPool and restarting, re-attaching the debugger and nothing happens.

Does anyone have a better idea?


Make sure you are trying to attach to the correct process. It is called w3wp.exe in IIS 6+.


On a page, on the code behinde call the command the Page OnLoad

Debug.Fail();

or

Debug.Assert(false);

then open this page, and wait for the Message from Debuger to appear and attach to visual studio. If not appear then its means that you are on release mode and you need to modify your web.config

If you have some error with your www service, then restart the iis-admin service and not only the www. With the iisAdmin www restarts also but some times debugger not attach with only www restart.

Hope this help you.

0

精彩评论

暂无评论...
验证码 换一张
取 消