Microsoft AL – Debugging

Original URL…

The process of finding and correcting errors is called debugging. With Visual Studio Code and the AL Language extension you get an integrated debugger to help you inspect your code to verify that your application can run as expected. You start a debugging session by pressing F5.

Tip

For more information about Debugging in Visual Studio Code, see Debugging.

Important

To enable debugging the NetFx40_LegacySecurityPolicy setting in the Microsoft.Dynamics.Nav.Server.exe.config file must be set to false. This requires a server restart.

For the preview, there are a number of limitations to be aware of:

  • “External code” can only be debugged if the code has the ShowMyCode flag set. For more information, see Security Setting and IP Protection.
  • Not all AL types yet show helpful debugging.
  • The debugger launches a new client instance each time you press F5. If you close the debugging session, and then start a new session, this new session will rely on a new client instance. We recommend that you close the Web client instances when you close a debugging session.
  • And finally, using the debugger with the online sandbox signup and AAD authentication method is not yet supported.

Breakpoints

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. Set a breakpoint by using the Debug Menu in Visual Studio Code.

Debugging Shortcuts

Keystroke Action
F5 Start debugging
Ctrl+F5 Start without debugging
Shift+F5 Stop debugging
Ctrl+Shift+F5 Restart debugging
F10 Step over
F11 Step into
Shift+F11 Step out

For more shortcuts, see Debugging.

Anuncios

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión /  Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )

w

Conectando a %s