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 can run as expected. The debugger UI runs in the RoleTailored client. The debugger services run on the computer that is running Microsoft Dynamics NAV Server.
For a tour of the new Microsoft Dynamics NAV Debugger, see Walkthrough: Debugging the Microsoft Dynamics NAV Windows Client.
In Microsoft Dynamics NAV 2009, you used Visual Studio to debug objects on the computer that is running Microsoft Dynamics NAV Server, and you used the Microsoft Dynamics NAV Debugger to debug objects running on the Classic client. You cannot use Visual Studio to debug objects on the computer that is running Microsoft Dynamics NAV Server in Microsoft Dynamics NAV 2013. Instead, you use the new Microsoft Dynamics NAV Debugger.
To start debugging, you attach the debugger to a business session. The business session that you select can be any of the following:
Microsoft Dynamics NAV Windows client session.
Microsoft Dynamics NAV SharePoint client session.
Microsoft Dynamics NAV Web client session.
OData web services session.
SOAP web services session.
NAS services session.
Background session that you start by using the STARTSESSION Function (Sessions).
After you attach the debugger, program flow runs until it reaches a breakpoint.
The remaining unattached business sessions continue to run without interruption.
For more information, see Activating the Debugger.
The basic concept in debugging is the breakpoint, which is a mark that you set on a statement. When the program flow reaches the breakpoint, the debugger stops execution until you instruct it to continue. Without any breakpoints, the code runs without interruption when the debugger is active. For more information, see Breakpoints.
To use the Microsoft Dynamics NAV debugger, the user who is logged in must be assigned the SUPER permission set for all companies. To assign the permission set for all companies, on the User Card page, under User Permission Sets, leave the Company column blank. If you assign the SUPER permission set for a specific company, then you get an error that you must be a member of the SUPER user role. For more information, see How to: Define Permissions for Users.
Assigning the SUPER permission set for all companies is required because a user who is debugging has access to business data in the debugged session.
If you do not want any user to be able to debug sessions on Microsoft Dynamics NAV Server, then you must disable debugging. This is useful if you have concerns about how to allow your data to be seen through the debugger. For more information, see How to: Disable Debugging.
Troubleshooting Protocol Mismatch Errors
We recommend that you do not use the settings parameter when you start a Microsoft Dynamics NAV Windows client if you later want to use that Microsoft Dynamics NAV Windows client to start the debugger. When you start the debugger from Sessions page, it uses some information from the default ClientUserSettings.config file, not the config file that you specified with the settings parameter when you started the Microsoft Dynamics NAV Windows client. There can be differences in the connection properties, which causes a protocol mismatch error.
For more information about the settings parameter, see Starting the Windows Client at the Command Prompt.