Quick Fix: Visual Studio 2019 Debugger Crashing When Attempting to Debug X++ Code
Recently, I wrote a blog post about breakpoints not being recognized when attempting to debug X++ code in Visual Studio 2019.
While working with this program, I noticed another hiccup I wanted to highlight to ensure you are aware of it and how you can fix it.
When attempting to debug X++ code the Visual Studio 2019 debugger can crash unexpectedly, which can be rather frustrating. Microsoft is aware of the issue and has its own post about it.
You can work around this issue by going back into your Dynamics 365 Finance and Operations environment and navigating to Options before moving to the debugging section.
Make sure the first check box (Debug items in the solution and items in specific packages) is checked. Then move into the Include Packages (Models) section and UNCHECK the models you will not be needing in the debugging session you will be running. For example, if you are not debugging unit tests you can go through the list and uncheck anything that starts with Atl*. You can probably also uncheck any model that ends with FormAdaptor as well. Any selection after that will be debugging session independently.
Get in touch with the Stoneridge Software experts if you have questions about this or anything else regarding your Dynamics 365 Finance and Operations solution.