Everybody knows how frustrating is to debug C/AL code, especially because you can set breakpoints only in debug mode. In Navision Techical briefing was presented a trick how to set breakpoints being not in debug mode. Even save your breakpoints for next C/AL session. Here is the trick: 1)Create a new codeunit and write run trigger so that it runs invisible. For example a:=1; 2)Activate debugger, run the codeunit and set breakpoint in this row. 3)Deactivate debugger. 4)Write following code before the codeline you want to break: codeunit.run(“TheNewCodeUnit”); 5)Activate debugger and uncheck the option Breakpoint on Triggers. 6)Run your breakpointed code. If C/AL meets the ‘breakpoint’, the new codeunit opens in the breakpointed row. Press F8 and you are at the row you wanted to breakpoint. If yo need the breakpoints in next session, you need not delete the “breakpoints”. Anu PS. Thaks to Margo giving me the trick
And thanks to Bardur at Navision A/S for giving the tip at Navision Technical Briefing