zoukankan      html  css  js  c++  java
  • VS2015/2013/2012 IIS Express Debug Classic ASP

    参考资料:

    https://msdn.microsoft.com/en-us/library/ms241740(v=vs.100).aspx

    When you attach to an ASP Web application, make sure you select the appropriate program types in the Attach To Process dialog box. When you debug script, Managed code must not be selected.

    http://weblogs.asp.net/akjoshi/Debugging-classic-asp-application-with-Visual-Studio-2005

    http://weblogs.asp.net/dixin/debugging-classic-asp-with-visual-studio-2013

    http://stackoverflow.com/questions/4520960/does-iis-express-support-debugging-classic-asp/27948911#27948911

    http://stackoverflow.com/questions/19760878/application-debugging-is-disabled-in-visual-studio-2012-on-classic-asp-debugging

    1. 如果你在 VS 中按 F5 启动调试的话, 默认是 Managed code. 是无法调试 ASP 页面的.

    2. 首先, 修改 C:UsersdotdDocumentsIISExpressconfigapplicationhost.config, 将 <asp> 部分修改为如下:

    <asp scriptErrorSentToBrowser="True" enableParentPaths="True" bufferingOn="True" errorsToNTLog="True" appAllowDebugging="True" appAllowClientDebug="True">
            <cache diskTemplateCacheDirectory="%TEMP%iisexpressASP Compiled Templates" />
            <session allowSessionState="True" />
            <limits />
    </asp>
    

    3. 在 CMD 中用如下命令启动 iis express

    iisexpress /config:C:UsersdotdDocumentsIISExpressconfigapplicationhost.config /site:ASPDemo
    

    4. 在 VS 中用 "附加到进程" 附加到 iisexpress.exe 的进程, 注意 "附加到" 选项选择 "脚本" (因为是ASP) 而不是 "托管" (这是 ASP.NET的默认方式).

    5. 先在浏览器中访问一次你要调试的页面 (这一步很重要, 是后续步骤的基础).

    6. 如果你做了第5步的话, 在 VS 中 "解决方案资源管理器" 你应该可以看到类似如下的情形

    7. 好, 现在打开 "脚本文档" 下面的  hello.asp (而不是本地目录的 hello.asp) 打断点. (看到那个"动态"了么, 这意味着你打的断点才能被Debugger知道).

    8. 重新访问该页面, 命中断点.

  • 相关阅读:
    PHP $_POST 变量
    PHP $_GET 变量
    PHP 完整表单实例
    PHP 表单
    PHP 表单
    PHP 表单验证
    00_前情回顾
    18_今日回顾
    VMware 12PRO安装Mac OS X 10.10.5
    05_传智播客iOS视频教程_第一个OC程序
  • 原文地址:https://www.cnblogs.com/qrlozte/p/5131391.html
Copyright © 2011-2022 走看看