XAF applications support collecting diagnostic information using common approaches applicable to any .NET applications. This topic lists Visual Studio settings required to collect error information and describes how to analyze this information.
Before debugging an error, modify the following Visual Studio settings:
Click Tools | Options... to invoke the Options dialog. In the left-hand panel, choose the Debugging | General category and disable the Just My Code option.
If you use Visual Studio 2015 or newer, enable Common Language Runtime Exceptions in the Exception Settings window. If this window is hidden, click Debug | Windows | Exception Settings in Visual Studio's menu (see Managing Exceptions with the Debugger).
If you use Visual Studio 2013 or earlier, click Debug | Exceptions... in the menu and enable Common Language Runtime Exceptions in the invoked Exceptions window (see How to: Break When an Exception is Thrown).
You can now run your application and reproduce the error. Open the Call Stack window and view the routines that are currently in the stack.