View SQL locks during AL debugging

Important

This content is archived and is not being updated. For the latest documentation, go to What's new and planned for Dynamics 365 Business Central. For the latest release plans, go to Dynamics 365 and Microsoft Power Platform release plans.

Enabled for Public preview General availability
Admins, makers, marketers, or analysts, automatically Sep 1, 2022 Oct 1, 2022

Business value

Understanding database locks when developing and troubleshooting in cloud sandboxes without direct SQL access can be hard. It can be difficult to identify which locks are taken from AL when calling, for example, the rec.Modify() or rec.FindSet() methods. While SQL locks can now be seen in the web client, using this for debugging is cumbersome because you need another browser with another session.

To help with this, the Database Statistics section in the Variables window for the Visual Studio Code AL debugging experience has been extended to show SQL locks for the debugged session.

Feature details

In addition to the last executed SQL statements and database statistics, you can now also get information about active SQL locks occurring during the session, which is being debugged. The list is updated when stepping through AL code. Commits will remove the held locks.

Tell us what you think

Help us improve Dynamics 365 Business Central by discussing ideas, providing suggestions, and giving feedback. Use the forum at https://aka.ms/bcideas.

See also

Debugging in AL (docs)