Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Debugging with Microsoft Dynamics NAV Debugger

Debugging with Microsoft Dynamics NAV Debugger

Microsoft Dynamics Nav 2009

Microsoft Dynamics NAV provides an integrated debugger to help you check, correct, or modify code so that your application can build successfully and run as expected. You use the integrated debugger to debug applications that run on the Classic client. To debug applications that run on the RoleTailored client, use Visual Studio.

The Debugger

The basic concept in debugging is the breakpoint, which is a mark that you can set on a statement. When the program flow reaches the statement, the debugger intervenes and suspends execution until you instruct it to continue. Without any breakpoints, the code would just run normally when the debugger is active. The state disabled breakpoint means that the breakpoint is still present on the statement but is momentarily disabled (execution will not stop at this breakpoint).

If you wish to determine the cause of a run-time error, you can disable the Breakpoint on Triggers setting from within the debugger and click Go. The debugger will automatically stop execution of the code when it encounters an error.

You can also use the debugger to find a logical error. However, finding the error will not be as easy, and you must have a good understanding of how the code is supposed to work. The debugger enables you to execute your C/AL code one statement at a time while you inspect the contents of global variables, local variables, and text constants at each step. This enables you to see whether the values that are actually used differ from the values that you expected when you designed the application.

The Breakpoint on Triggers setting (SHIFT+CTRL+F12) is enabled by default when you activate the debugger for the first time. Otherwise the code would be executed normally because there are no breakpoints. The debugger will suspend execution of the code when it reaches the first trigger. At this point, you can set other breakpoints and then disable the Breakpoint on Triggers option. If you do not disable the Breakpoint on Triggers setting, the debugger will suspend execution of the code at every trigger it reaches.

See Also

Community Additions

ADD
Show:
© 2015 Microsoft