Debugging C# Source Generator

In this post, we will look into how to Debug Source Generator using Visual Studio 2019. The prerequisite is to ensure you have Visual Studio 2019 16.10 or above. Prerequisite Ensure you have Visual Studio 2019 16.10 or above.Ensure .Net Compiler Platform SDK is installed. To install .Net Compiler Platform SDK, launch the Visual Studio … Continue reading Debugging C# Source Generator

More on debugging DependencyProperty

In the previous post on DependencyPropertyHelper, we explored one way of debugging the Dependency Properties. The DepedencyPropertyHelper provides you details on from which value provider the final value was calculated from. However, if you want to trace and ensure the binding has been set correctly, you could make use of PresentationTraceSources. For example, consider following binding. <Button … Continue reading More on debugging DependencyProperty

DependencyPropertyHelper.GetValueSource : Debugging Helper for Dependency Properties

DependencyPropertyHelper.GetValueSource is a great debugging aid in detecting the source of value of a Dependency Property. This is quite useful for WPF developers who might need to figure out the source which provides the current value for the Dependency Property. The DependencyPropertyHelper.GetValueSource returns a structure ValueSource which has 5 Properties. BaseValueSourceIsAnimatedIsCoercedIsCurrentIsExpression DependencyPropertyHelper.GetValueSource(buttonControl,CustomValueProperty) {System.Windows.ValueSource} BaseValueSource: Local IsAnimated: false IsCoerced: false IsCurrent: … Continue reading DependencyPropertyHelper.GetValueSource : Debugging Helper for Dependency Properties

Customized Debugger Tooltip

Code-Execute-Debug-Code-Execute-Debug.. This seems to be never ending cycle for any developer. Considerable amount of time of this cycle is spend in Debug phase, wherein user steps through breakpoints and traverse the objects and their properties. Thankfully, Microsoft has ensured that primitive types always shows the value, instead of any less-meaningful information. But what happens when … Continue reading Customized Debugger Tooltip