MonoDevelop 中是否可以调试 ASP.NET 和 ASP.NET MVC 应用程序?

发布于 2024-09-30 09:49:56 字数 1723 浏览 3 评论 0原文

我尝试在 MonoDevelop 2.4(Windows 7 上的 Mono 2.8)中调试示例 ASP.NET 和 ASP.NET MVC 应用程序,但断点不起作用。

如果调试 MVC 应用程序 MonoDevelop 会将以下内容打印到输出中:

Mono.Debugger.Soft.VMDisconnectedException: An exception of type "Mono.Debugger.Soft.VMDisconnectedException" thrown.
   at Mono.Debugger.Soft.Connection.SendReceive(CommandSet command_set, Int32 command, PacketWriter packet)
   at Mono.Debugger.Soft.Connection.Type_GetInfo(Int64 id)
   at Mono.Debugger.Soft.TypeMirror.GetInfo()
   at Mono.Debugger.Soft.TypeMirror.get_FullName()
   at Mono.Debugging.Soft.SoftDebuggerSession.HandleEvent(Event e, Boolean dequeuing)
   at Mono.Debugging.Soft.SoftDebuggerSession.HandleEvent(Event e)
   at Mono.Debugging.Soft.SoftDebuggerSession.EventHandler()

如果调试 ASP.NET 应用程序 MonoDevelop 将在一两秒后静默完成调试,有时会留下一个悬挂的黑色控制台窗口 (mono.exe)。

有人知道 MonoDevelop 支持 Web 应用程序的调试吗?或者也许如何让它发挥作用?

更新: 每次尝试调试后,MonoDevelop 日志中也会出现错误消息。在 Mono 2.8 中不会出现错误,但对于旧版本(2.6.7、2.6.4)则会出现错误。

ERROR [2010-11-03 17:32:47Z]: Type '<Module>' loaded more than once

ERROR [2010-11-03 17:32:47Z]: Type '<Module>' loaded more than once

ERROR [2010-11-03 17:32:47Z]: Type 'System.Threading.ReaderWriterLockSlim' loaded more than once

ERROR [2010-11-03 17:32:47Z]: Type 'TypeInfo__TypeMetadata' loaded more than once

ERROR [2010-11-03 17:32:47Z]: Type 'ChannelInfo__TypeMetadata' loaded more than once

ERROR [2010-11-03 17:32:47Z]: Type 'CrossAppDomainData__TypeMetadata' loaded more than once

OnTargetEvent, type - TargetExited

更新2: 在查看了 MonoDevelop.Debugger.Soft.AspNet 源代码后,我发现它只能在 1.0 和 1.0 版本中使用。 2.0 的运行时。我已经更改了测试项目的运行时版本,但没有更改...

Tx

I've tried to debug sample ASP.NET and ASP.NET MVC applications in MonoDevelop 2.4 (on Mono 2.8 on Windows 7) but breakpoints doesn't work.

If debugging MVC Application MonoDevelop prints the following into the output:

Mono.Debugger.Soft.VMDisconnectedException: An exception of type "Mono.Debugger.Soft.VMDisconnectedException" thrown.
   at Mono.Debugger.Soft.Connection.SendReceive(CommandSet command_set, Int32 command, PacketWriter packet)
   at Mono.Debugger.Soft.Connection.Type_GetInfo(Int64 id)
   at Mono.Debugger.Soft.TypeMirror.GetInfo()
   at Mono.Debugger.Soft.TypeMirror.get_FullName()
   at Mono.Debugging.Soft.SoftDebuggerSession.HandleEvent(Event e, Boolean dequeuing)
   at Mono.Debugging.Soft.SoftDebuggerSession.HandleEvent(Event e)
   at Mono.Debugging.Soft.SoftDebuggerSession.EventHandler()

If debuffing ASP.NET application MonoDevelop silently finishes debugging after a second or two and sometimes leaves a hanging black console window (mono.exe).

Does anybody know is debugging of Web Applications supported by MonoDevelop? Or maybe how to make it work?

Upd:
Also there are error messages in MonoDevelop log after each attempt to debug. In Mono 2.8 no errors appear but for older versions (2.6.7, 2.6.4) they are.

ERROR [2010-11-03 17:32:47Z]: Type '<Module>' loaded more than once

ERROR [2010-11-03 17:32:47Z]: Type '<Module>' loaded more than once

ERROR [2010-11-03 17:32:47Z]: Type 'System.Threading.ReaderWriterLockSlim' loaded more than once

ERROR [2010-11-03 17:32:47Z]: Type 'TypeInfo__TypeMetadata' loaded more than once

ERROR [2010-11-03 17:32:47Z]: Type 'ChannelInfo__TypeMetadata' loaded more than once

ERROR [2010-11-03 17:32:47Z]: Type 'CrossAppDomainData__TypeMetadata' loaded more than once

OnTargetEvent, type - TargetExited

Upd2:
After looking throuth MonoDevelop.Debugger.Soft.AspNet sources i figured out that it supossed to work only with versions 1.0 & 2.0 of runtime. I've changed the runtime version of my test project but no changes...

Tx

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

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

发布评论

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

评论(2

久光 2024-10-07 09:49:56

软调试器支持 ASP.NET 调试,但 Windows 对软调试器的支持尚未经过太多测试。在您的具体情况下,目标 Mono 运行时在调试模式下似乎崩溃了。您可以提交错误报告吗?

此外,即将推出的 MonoDevelop 2.4.1 添加了对调试 4.0 框架的支持。

更新:看起来已经提交了一个错误

ASP.NET debugging is supported with the soft debugger, but Windows support for the soft debugger has not been tested very much. In your specific case it looks like the targeted Mono runtime is crashing when in debugging mode. Could you file a bug report?

Also, the upcoming MonoDevelop 2.4.1 adds support for debugging the 4.0 framework.

UPDATE: it looks like there is a bug filed already.

森林散布 2024-10-07 09:49:56

根据发行说明

初步支持 ASP.NET 调试。仅在具有最新版本的 Mono 调试器或使用软调试器后端的 Linux 中才支持此功能。

所以我猜想使用 MonoDevelop 调试 ASP.NET 应用程序仍在大力开发中。

According to the release notes:

There is initial support for ASP.NET debugging. This is supported only in Linux with the latest version of the Mono debugger or using the Soft Debugger backend.

So I guess debugging ASP.NET applications with MonoDevelop is still under heavy development.

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