The previous version of Dynamics NAV, versión 2009, already had an option to debug C# sessions... but an incomprehensible C# code was shown. Many of the Dynamics NAV developers (as myself) where unable to underestand it. So if we needed to debug, we tried to reproduce the process on the classic client to be able to debug C/AL code.
The classic client has been droped from Dynamics NAV. Good new then that the new debugger shows C/AL code! In addition, it includes cool features, like conditional breakpoints, breaking on record changes, or skip code from codeunit 1.
Start the debugger
You must start the debugger from the Dynamics NAV Development Environment (AKA the classic client. You will still use it to develop on the C/SIDE environment).
From there click Tools , Debugger, Debug Session. A page will open, showing all active sessions. You will be able to select the session you want to debug from any user and any client.
From there click Tools , Debugger, Debug Session. A page will open, showing all active sessions. You will be able to select the session you want to debug from any user and any client.
Once you have selected the session click the Debug option. If you want to debug a session that is not on the list, you can also use the Debug Next option. It will debug the next session connecting to the server. This is a great feature to debug WebServices for instance.
And the debugger opens... aulthough no code is shown on yet!
As the message says, the debugger is Waiting for break.
You have two options to force the break:
1. Place a breakpoint on an object statement and wait until the sessions reaches that statement.
2. Click the Break option to debug from the point where the session is right now.
1. Place a breakpoint on an object statement and wait until the sessions reaches that statement.
2. Click the Break option to debug from the point where the session is right now.
And now the debugger is on
In future posts I will give more details about the new debugger.
Salut!
Laura Nicolàs
Laura Nicolàs
No comments:
Post a Comment