How toGeneral


Sana Commerce 9.0
Your connector

Debug in NAV 2009

In this section the debugging in NAV 2009 is described. It differs from the standard debugging procedure in NAV Classic. In order to debug in NAV 2009:

Step 1: Open the Sana Commerce solution in Visual Studio.

If you use Windows Vista and have UAC turned on, you will need to open Visual Studio with 'Run as administrator'.

Step 2: Enable debugging in the CustomSettings.config file which can be found here: C:\Program Files\Microsoft Dynamics NAV\60\Service:

Debugging Option is Enabled

Step 3: Restart the "Microsoft Dynamics NAV Server" service.

Step 4: Setup connectionStrings in the 'web.config' file of the starter site project to connect to you NAV 2009 Server service.

Step 5: Open the 'Codeunit11123311.cs' file (as an example) in Visual Studio:

'Codeunit11123311.cs' File

Step 6: Go to the 'GetDefaultCurrency' method and set breakpoint inside this method:

Inserting the Breakpoint in the 'GetDefaultCurrency' Method

Step 7: Attach the NAV service. Click 'Debug > Attach to process...' and attach 'Microsoft.Dynamics.Nav.Server.exe':

Attaching the NAV Server Service

Step 8: Run the solution in debug mode using Visual Studio: right click on the 'Sana.Commerce.StarterSite' project in Solution Explorer and click 'Debug > Start New Instance':

Running the Project in Debug Mode

Step 9: Now you are able to debug in NAV 2009.

Debugging Process is Started

How toGeneral