Web 表单 - .Net Framework 4.7.2

问题描述 投票:0回答:0

我正在为一位客户更新他的 Web 应用程序 [c#](以便将来迁移到更新的技术)。

有一些单独的配置,其中之一是我们需要在发生异常时在堆栈跟踪中显示行号。构建和高级构建设置已进行调整(仅限 Pdb),然后部署(到 azure 应用程序服务)。

现在发生错误时会触发异常,但仍然不显示行号。

Advance Build Settings

调试信息已更新为: Advance Build Settings

此外,关闭 Visual Studio(社区/专业和企业)2022 时,保存更改并重新打开项目后,调试信息已设置回 none

堆栈跟踪示例: 堆栈跟踪: System.NullReferenceException:未将对象引用设置为对象的实例。 在 MyApp.SiteMaster.master_Page_PreLoad(对象发送者,EventArgs e) 在 System.EventHandler.Invoke(对象发送者,EventArgs e) 在 System.Web.UI.Page.OnPreLoad(EventArgs e) 在 System.Web.UI.Page.ProcessRequestMain(布尔值 includeStagesBeforeAsyncPoint、布尔值 includeStagesAfterAsyncPoint)

应该是(粗体): 堆栈跟踪: System.NullReferenceException:对象引用未设置为 对象的实例。 在 MyApp.SiteMaster.master_Page_PreLoad(对象发送者,EventArgs e) C语言

c# asp.net webforms
© www.soinside.com 2019 - 2024. All rights reserved.