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

  • 相关阅读:
    MongoDB 副本集搭建 & 副本集扩容
    MongoDB 部署 & 基础命令
    MyBatis常见面试题:#{}和${}的区别是什么?
    MyBatis常见面试题:说说MyBatis的工作原理
    Java四种引用类型回收时机介绍
    Java虚拟机之垃圾回收器
    Servlet中过滤器、监听器和拦截器的区别
    Java里一个线程两次调用start()方法会出现什么情况
    二叉树、二叉查找树、平衡树和红黑树概念及其性质
    转:基于Redis实现延时队列
  • 原文地址:https://www.cnblogs.com/qrlozte/p/5131391.html
Copyright © 2011-2022 走看看