生产服务器上的.NET调试器上、NET

2023-09-04 00:46:11 作者:欧气爆棚的游戏ID 欧气十足的游戏名

我和我的团队正在开发一个.NET的Web应用程序项目的第一次。我们想知道在生产服务器上调试问题的最有效方法。目前,我们的FTP我们的工作上传到客户的生产服务器。

My team and I are working on a .net web app project for the first time. We want to know the most effective way to debug issues on a production server. Currently, we ftp upload our work to a client's production server.

由于我们的背景是LAMP中,我们使用以ssh方式连接到生产服务器,并使用模具的组合(),的print_r()和注释掉的技术来解决问题。

Since our background is in LAMP, we're using to SSHing into the production server, and using a combination of die(), print_r() and comment out techniques to troubleshoot the problem.

除非我误解的方式。NET的工作,我不认为我可以用同样的方法,因为更改.NET code背后需要一个完整的重新构建项目(在本地主机上),则上载。这也太费时....

Unless I misunderstand the way .net work, I don't think i can use the same approach because changes to .net code behind requires a complete re-build of the project (on localhost), then an upload. This is too time consuming....

有没有更好的方法来解决在生产服务器上的问题?

Is there a better way to troubleshoot issues on a production server?

推荐答案

有真的只有三种方式调试服务器端的问题。

There are really only three ways to debug server side issues.

登录 提前计划,并添加日志到您的应用程序。像log4net的和企业库大多数日志框架有模式登录取决于配置设置更多或更少的信息。 IIS也有它自己的日志,你可以看看。

Logging Plan ahead and add logging to your application. Most logging frameworks like log4net and Enterprise library have modes to log more or less information depending on a configuration setting. IIS also has its own logging that you can look at.

仪器仪表 您可以添加性能计数器到您的应用程序,也可以使用现有的性能计数器,如果您有性能问题。同样来自Sysinternals的和Wireshark可用的工具可以派上用场,为您的code以外的问题。

Instrumentation You can add performance counters to your application and also use the existing performance counters if you are having a performance issue. Also tools available from Sysinternals and WireShark can come in handy for problems outside of your code.

内存转储 您可以捕捉你的应用程序的内存转储,并使用类似的WinDbg工具来看看什么在你的系统中去的一个快照。

Memory Dumps You can capture memory dumps of your application and use a tool like WinDbg to look at a snapshot of what's going on in your system.