Skip to main content

Posts

Showing posts from 2023

Debugging 365 using the info class

 A good and often used trick to use when hunting down bugs is putting a break point in the info class in the method add() and examining the call stack when an error is thrown causing the add method in the info class to be called for updating the infolog. However sometimes when you are debugging in Visual Studio the debugger will not load the symbols needed to debug in the info class. In the old days you had to resort to the very slow "Load all modules, unless excluded" under Debugging / Symbols / Automatic symbol loading preference, which would load symbols for ALL modules. A neat addition that Microsoft has added to the Dynamics 365 FO/SCM extension for Visual Studio (can't remember from what version at the moment), is that you can now debug with "Load only specified modules". So when you encouter that the debugger will not load symbols for the info class do this: 1. Choose Options in the 365 Visual Studio extension 2. Go to Dynamics 365 / Debugging 3. Put a ch...

x++ great but sometimes weird and annoying ....

Preamble: This occurred running on Finance and Operations (Dynamics 365) - (Platform Update57) 7.0.6861.86 extension for Visual Studio. Historically the x++ langauge has not had great support for access modifiers. The original workings was, that all class members in a class were private, and could not be accessed, by code outside the class, unless ofcourse you made a (parm) method giving access to change or just get something. Methods could have access modifiers but they were seldom used and were always public, unless you explicitly wrote something else. Somewhere a long the lines in D365 x++ has evolved to be more c#-like and therefor you can now put access modifiers on you class members, so that if you declare a class member public, you do not actually need to write an access (parm) method. However, the x++ compiler has it's quirks it seems. Consider this class declaration: internal final class MOLSOPackingSlipFromReceivedTransitGoodsUpdater {    ...