[英]How to ouput API debug logs in a file ? (IIS)
我對使用應用程序洞察的應用程序 (api) 有疑問。 在我的電腦上,一切都很好。 在開發服務器上,沒有任何反應。 visual studio 上的 application insights output 非常不言自明。 如果我能抓住他們,我將能夠進行調查。
當托管在 IIS 上時,您如何 output 在文件中像 visual studio 中那樣進行“輸出調試”?
為了捕獲Debug.Write
和Debug.Writeline
輸出,我們可以使用來自sysinternal
的DebugView
https://learn.microsoft.com/en-us/sysinternals/downloads/debugview
DebugView 是一個應用程序,可讓您在本地系統上監視調試 output。
此外,內置方法Response.AppendTolog()也可以寫入IIS個日志文件。
從 ASP.NET 應用程序寫入 IIS 日志
如果有什么我可以幫忙的,請隨時告訴我。
使用 System.Diagnostics.Debug.WriteLine(...),您會在 Visual Studio 中看到 output。 並在webconfig中啟用調試
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.