在经典 ASP / MVC3 混合应用程序中启用脚本调试

发布于 2024-11-28 20:51:41 字数 173 浏览 2 评论 0原文

我有一个 .Net MVC 3 / Classic ASP 混合网站。我们之所以这样做,是因为我们正在稳步用 .Net 取代经典 ASP 位。

目前,当我在 VS2010 中按 F5 时,网站会启动并运行良好。但是,我似乎无法在 Classic ASP 代码中设置断点。如何在 IIS Express 中执行此操作?

I have a site that is a .Net MVC 3 / Classic ASP hybrid. We have this as we are steadily replacing the Classic ASP bits with .Net.

Currently when I hit F5 in VS2010 the site spins up and runs fine. However, I don't seem to be able to set break points in the Classic ASP code. How can I do this in IIS Express?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

悲欢浪云 2024-12-05 20:51:42

我将这个 ASP 包含类放在一起,可与 Firebug+FirePHP 一起使用。它允许您将值(包括字符串、多维数组,甚至使用 json.asp 创建的对象)记录到 Firebug 控制台,并查看 ASP 的内置集合对象,这会有所帮助(特别是使用 Ajax,您无法在没有任何信息的情况下输出调试数据)破坏 json 响应。)Ajax 脚本加载时间和错误会自动记录以便快速查看。

https://github.com/dmeagor/ClassicASP-FirePHP

只需包含文件并使用 log( somevalue) 将格式化变量发送到 firebug 控制台。

根据 MIT 开源许可发布

I put together this ASP include class which works with Firebug+FirePHP. It allows you to log values (including strings, multi-dimensional arrays and even objects created with json.asp) to the firebug console and view ASP's built in collection objects which can help (particularly with Ajax where you can't output debug data without breaking the json response.) Ajax script load times and errors are automatically logged for quick viewing.

https://github.com/dmeagor/ClassicASP-FirePHP

Just include the file and use log(somevalue) to send formatted variables to the firebug console.

Released under MIT open source license

吻泪 2024-12-05 20:51:41

据我所知,你无法像使用 vb.net 或 c# 那样调试 classic,因为 classic asp 未编译。因此,不会创建和加载可执行文件以便您能够实际使用智能感知。

但愿如此。迁移到 vb.net 怎么样,它好多了!

As far as I know ilive, you cannot debug classic the same way as you would, say with vb.net or c# because classic asp is not compiled. Therefore an executable is not created and loaded for you to be able to actually use say intellisense.

WIsh it would though. How about moving to vb.net, its so much better!

猫烠⑼条掵仅有一顆心 2024-12-05 20:51:41

您可以像调试 .NET 一样调试经典 ASP。
您必须在 IIS 中启用服务器端调试。该位置根据您所使用的 IIS 版本而有所不同,但在 IIS7 中,您可以双击您网站(或所有网站)的 IIS 管理器中的 ASP 图标,并启用客户端和服务器端调试。
只要您在运行 IIS 的同一台计算机上进行开发,就会捕获错误,并且您可以选择可能的调试器,包括安装的 Visual Studio 软件。
您可以根据需要添加断点和监视。
甚至可以在经典 ASP 代码中使用 vbscript 关键字“stop”来获取断点并启动调试器。

You can debug classic ASP the same way as .NET.
You will have to enable server-side debugging in IIS. The location differs depending on what version of IIS you have, but in IIS7 you can doubleclick the ASP icon in IIS manager for your website (or for all websites) and enable client-side and server-side debugging.
As long as you develop on the same machine as IIS is running, errors will be caught and you will get a choice of possible debuggers, including your installed visual studio software.
You can add breakpoints and watches as needed.
There is even a vbscript keyword "stop" you can use in your classic ASP code to get a breakpoint and start the debugger.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文