简体   繁体   English

如何从发布到文件夹的代码中进行IIS 6.0调试

[英]How to do IIS 6.0 debugging from the code that is published to a folder

I want to do debugging from IIS 6.0 and here is the scenario. 我想从IIS 6.0进行调试,这是方案。 I have a web application and I published onto a physical folder (Say FolderA) in my machine. 我有一个Web应用程序,并且已发布到机器中的物理文件夹(“ Say FolderA”)上。 I then merged it with another folder (say FolderB) to integrate the functionality together (essentially, folder merge of bin, images, js, css folders etc). 然后,我将其与另一个文件夹合并(例如FolderB),以将功能集成在一起(实质上是bin,图像,js,css文件夹等的文件夹合并)。 I then mounted FolderB on IIS in my local machine as a new website. 然后,我在本地计算机上的IIS上将FolderB挂载为新网站。

Now, I would want to debug a specific page in the website through IIS. 现在,我想通过IIS调试网站中的特定页面。 Is this possible? 这可能吗? AFAIK, the code in VS got disconnected from code in IIS and so w3wp.exe wouldn't be able to track back to the code that I have in VS. AFAIK,VS中的代码与IIS中的代码断开了连接,因此w3wp.exe将无法追溯到VS中的代码。 Please help.. 请帮忙..

In Visual Studio, open the Debug menu and select the Attach to Process option. 在Visual Studio中,打开“ 调试”菜单,然后选择“ 附加到进程”选项。 In the list of processes displayed you should find aspnet_wp.exe . 在显示的进程列表中,您应该找到aspnet_wp.exe Select this process and click Attach. 选择此过程,然后单击附加。 Debugging your code should now be possible. 现在应该可以调试代码了。

Set a breakpoint in your web application code at the required location and when you open the relevant page in your browser, your breakpoint should be triggered in VS. 在Web应用程序代码中的所需位置设置一个断点,然后在浏览器中打开相关页面时,应该在VS中触发断点。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM