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 process
, 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.
我正在调试Sitecore 6 ASP。使用Visual Studio 2008 (Windows Server 2003 OS)的NET代码。我想让断点发挥作用。我试着设置断点,然后在VS上调试->附加到进程。-> IIS web服务器进程,但当我浏览到一个特定的.aspx页面时,没有发生任何事情,该页面的断点位于Sitecore.Web.UI.WebControl的开头。DoRender方法。
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?
有人有更好的主意吗?
2 个解决方案
#1
3
Make sure you are trying to attach to the correct process. It is called w3wp.exe in IIS 6+.
确保您正在尝试连接到正确的进程。它被称为w3wp。exe在IIS 6 +。
#2
0
On a page, on the code behinde call the command the Page OnLoad
在页面上,在后面的代码上调用命令页面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
然后打开这个页面,等待调试器出现并附加到visual studio的消息。如果没有出现,则意味着您处于发布模式,需要修改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.
如果您的www服务有错误,那么重新启动iis-admin服务,而不仅仅是www。与iisAdmin www重新启动,但有时调试器不附加仅www重新启动。
Hope this help you.
希望这对你有所帮助。
#1
3
Make sure you are trying to attach to the correct process. It is called w3wp.exe in IIS 6+.
确保您正在尝试连接到正确的进程。它被称为w3wp。exe在IIS 6 +。
#2
0
On a page, on the code behinde call the command the Page OnLoad
在页面上,在后面的代码上调用命令页面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
然后打开这个页面,等待调试器出现并附加到visual studio的消息。如果没有出现,则意味着您处于发布模式,需要修改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.
如果您的www服务有错误,那么重新启动iis-admin服务,而不仅仅是www。与iisAdmin www重新启动,但有时调试器不附加仅www重新启动。
Hope this help you.
希望这对你有所帮助。