如何在登台服务器中调试 .net dll 程序集

发布于 2024-11-09 14:28:19 字数 302 浏览 0 评论 0原文

有没有一种方法或工具可以在临时服务器中调试 .net dll 程序集。我在登台服务器上部署了 ASP.NET Web dll。

更新

  1. 在代码中实现调试逻辑以关闭/打开调试。 (来自@maple_shaft)
  2. ASP.NET 远程调试。 (来自@maple_shaft)

问题:

  1. ASP.NET 中是否有一个跟踪选项,可以在 *.config 文件上关闭/打开,允许显示每个正在运行的类,如 *.ASPX 跟踪功能。

任何想法将不胜感激。

Is there a way or tool by which I can debug .net dll assemblies in staging server. I have a ASP.NET web dlls deployed on staging server.

Updates

  1. Implementing debugging logic within code to turn off/on debugging. (from @maple_shaft)
  2. ASP.NET Remote debugging. (from @maple_shaft)

Question:

  1. Is there a trace option in ASP.NET which can be turned off/on on *.config file, allows display of every class is running, like *.ASPX trace function.

Any idea would be very much appreciated.

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

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

发布评论

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

评论(2

在你怀里撒娇 2024-11-16 14:28:19

你检查过WinDbg(Windows调试工具的一部分,现在是Windows SDK的一部分)吗?

我在发布环境中调试 .NET 应用程序方面没有太多经验,但我们很少遇到过这样的极端情况:本机代码中的问题只会出现在客户计算机上,并且无法在其他任何地方重复。放置 WinDbg 以及少量所需的源文件和调试符号,使我们能够直接在客户环境中解决这些问题。

have you checked out WinDbg (part of Debugging Tools for Windows, which is now part of Windows SDK)?

I don't have as much experience with debugging .NET apps in release environment, but we had few extreme cases where a problem in native code would only occur on customer machines and couldn't be duplicated anywhere else. Placing WinDbg, along with few needed source files and debug symbols, allowed us to solve those issues directly in customer environment.

殊姿 2024-11-16 14:28:19

最好的方法是将日志记录代码放在整个代码中,以便您可以在日志记录配置中切换到调试级别。

除了可以使用 Visual Studio 远程完成真正的调试之外,还有一些先决条件:

1) 部署到暂存的程序集必须在调试模式下构建。

2) 您必须为临时服务器上打开的远程调试端口设置适当的防火墙例外。

部署在登台上的应用程序可能是在发布模式下构建的,因此无法远程执行此操作,但是您始终可以在调试模式下构建部署并手动重新部署到服务器来执行此操作。

就防火墙例外而言,您必须通过组织中的正确渠道才能获得为您制定的防火墙例外(如果需要)。

The best way is to put logging code throughout your code so that you can switch to the debug level in your logging configuration.

Apart from this true debugging can be done remotely using Visual Studio, however there are some prerequisites:

1) Your assemblies deployed to staging must be built in Debug mode.

2) You must have the appropriate firewall exceptions for the remote debugging ports open on the staging server.

Your app deployed on staging is probably built in Release mode, making it impossible to do remotely, however you can always build a deployment in Debug mode and manually redeploy to your server to do this.

As far as firewall exceptions go, you will have to go through the right channels in your organization to get firewall exceptions made for you if they are needed.

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