我试图找出一种方法来调试我在Azure的应用程序洞察中收到的异常.我是这种类型的调试的新手,因为我只是在Visual Studio中处理错误,而Visual Studio正在运行一个活动的调试器.但是,对于Application Insights,存在空引用异常,这些异常仅提供调用堆栈,并且没有有用的异常消息.
例外消息: Arg_NullReferenceException
调用堆栈:at SharedLibrary!<BaseAddress>+0x68d4c5
--- End of stack trace from previous location where exception was thrown ---
at SharedLibrary!<BaseAddress>+0x329115
at SharedLibrary!<BaseAddress>+0x329207
at SharedLibrary!<BaseAddress>+0x34d603
其他例外有消息,例如Excep_FromHResult 0x800455A0,其他人实际上显示他们追溯到的方法.
有没有办法找到解密callstack或Base Address或HResult这些异常的来源?
这对于消除我的应用中的错误非常有用.
我正在尝试检测Application.Resources资源字典中的更改,因此我可以在更新时自动将Titlebar更改为Accent Color.所有XAML控件和元素都会自动更改,并且在将纯色画笔设置为DSDFS画笔的地址时,其内部值会更改.
这是我尝试用来检测更改的代码:
public static DependencyProperty accent = DependencyProperty.Register("DictChange", typeof(ResourceDictionary), typeof(Shell), new PropertyMetadata(Application.Current.Resources, new PropertyChangedCallback(accent_PropertyChanged)));
public ResourceDictionary DictChange
{
get { return (ResourceDictionary)GetValue(accent); }
set { SetValue(accent, value); }
}
private static void accent_PropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
_app.SetTitlebar();
}
Run Code Online (Sandbox Code Playgroud)
我假设它错了,或者我不确定检测更改是否正确.我曾经使用Application.Current.Resources["SystemControlBackgroundAccentBrush"] as SolidColorBrush并尝试检测其属性的前一次迭代,但这也无效.
我究竟做错了什么?请帮忙 :)