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. 重新访问该页面, 命中断点.

  • 相关阅读:
    Did not find handler method for springMVC资源文件扫描不到---关于spring的那些坑
    mysql中OPTIMIZE TABLE的作用
    Linux环境下apache性能测试工具ab使用详解
    sqlite数据库 adb 从配置到查询表中数据全过程-----献给初学的自己
    c3p0参数解释
    linux下如何启动/停止/重启mysql:
    [MySQL] 变量(参数)的查看和设置
    mysql运行参数详解
    单例模式 理解,简单通透
    this的一些场景
  • 原文地址:https://www.cnblogs.com/qrlozte/p/5131391.html
Copyright © 2011-2022 走看看