Microsoft Dynamics NAV - C/SIDE Solution Development -

Microsoft Dynamics NAV – C/SIDE Solution Development

Locus IT ServicesMicrosoft Dynamics NAV – C/SIDE Solution Development

Lesson 2: Debugging


Debugging : The process of finding and correcting errors is called debugging. Microsoft Dynamics NAV 2013 provides an integrated debugger to help you inspect your code to verify that your application runs as expected. The debugger user interface (UI) runs in the Microsoft Dynamics NAV 2013 client for Windows. The debugger services run in the Microsoft Dynamics NAV Server.

Activating the Debugger

When you activate the debugger, you start it. When you start the debugger, it can be in one of the following states:

  • Attached to a session.
  • Waiting to attach to a session.

To start the debugger in the Microsoft Dynamics NAV 2013 Development Environment, in the Tools menu, click Debugger > Debug Session. This opens the Session List window that shows all debuggable sessions that currently run on the same Microsoft Dynamics NAV 2013 server instances on the local machine instance as the debugger . This is the same instance that is targeted when you use the Run action on Application objects in the Object Designer window.

In the Session List page, you attach the debugger to a session by doing one of the following:

  • Select a specific session, andthen click Debug.
  • Click Debug Next, and then start a new session.

Debugger Page

After you start a debugger, the Debugger page opens. You use the Debugger page to manage the debug process as follows:

  • Step through the code.
  • Manage the code execution.
  • Manage the breakpoints.
  • View the variables in scope of the current line.
  • View the last error message.
  • Manage watches.
  • View the call stack.


You can break code execution of the session that you are debugging by doing the following:

  • Setting a breakpoint on a line of code.
  • Specifying a break on the next statement.
  • Specifying a break on errors.
  • Specifying a break on record changes.

You can set breakpoints before you start a debugging session or when you are debugging. Breakpoints and break rules are applied immediately in the session to which the debugger is attached.

Break Rules

The debugger usually stops on breakpoints. However, you can enable other break rules that enable the debugger to do the following:

  • Stop on error.
  • Break on record changes.
  • Skip any breaks in Codeunit 1.

To define these additional rules in the Debugger page, click Break Rules. It opens the Debugger Break Rules dialog box.

Locus IT Project Management Office
What’s it?