Al: Debug extension stops midway and BC session hangs locking tables for tens of minutes to over an hour, can't be removed

Created on 11 Nov 2020  Â·  6Comments  Â·  Source: microsoft/AL

Describe the bug
Debug extension stops midway and BC session hangs locking tables for tens of minutes to over an hour, can't be removed.

To Reproduce
Steps and to reproduce the behavior:

  1. Create new project that inserts a header and a few sales lines in a sales invoice
  2. make sure you use something more complex
    3.run debugger with debug without publishing or publish with debugger making sure you have some breakpoints when the sales lines get inserted
  3. step through the code and midway after the first line is inserted run a function in another codeunit, pretend the code is big and you need to read it all.
  4. debug buttons disappear and BC session is locking tables, it cannot be removed.

AL Code to reproduce the issue

Expected behavior
Debugger should continue to run until it is stopped by developer

Screenshots

5. Versions:

  • AL Language: v6.1.362735
  • Business Central: NZ Business Central 17.0 (Platform 17.0.17020.18543 + Application 17.0.16993.0)

Most helpful comment

Should be fixed for the 17.2 release of BC.

All 6 comments

The issue definitely needs more info for the developers to know better what's going on, what's getting locked? Is there an error in the debug console? Error in the Event Viewer? Do you have the stacktrace for where this happens?

I've been running into issues that I think are related to this - when my code breaks on an error and I stop the debug session while the client is still processing.
Stopping a debug session doesn't seem to let the service know that it should continue running what it was doing so tables remain locked, etc.
The only way to release it properly is by pressing Continue in the debugger before stopping it.

I've had to restart the service to be able to start the client again.
Could it be you're overflooding the debug process so it crashes - but the locking is then caused by the issue I described?

The issue definitely needs more info for the developers to know better what's going on, what's getting locked? Is there an error in the debug console? Error in the Event Viewer? Do you have the stacktrace for where this happens?

I've been running into issues that I think are related to this - when my code breaks on an error and I stop the debug session while the client is still processing.
Stopping a debug session doesn't seem to let the service know that it should continue running what it was doing so tables remain locked, etc.
The only way to release it properly is by pressing Continue in the debugger before stopping it.

I've had to restart the service to be able to start the client again.
Could it be you're overflooding the debug process so it crashes - but the locking is then caused by the issue I described?

That's great if you are debugging on-prem etc - at least there's a fix, but restarting the service isn't a luxury anyone on SaaS has - so us poor SaaS debuggers have to wait at least 30 minutes before the locks are released because the session times out.

It's infuriating - debug sessions should know when the debugger detaches and should continue execution.

Sorry, hadn't seen this thread: https://github.com/microsoft/AL/issues/6233

Should be fixed for the 17.2 release of BC.

Should be fixed for the 17.2 release of BC.

Thank you for that @kalberes, can you point me to where I can find a list of this minor releases and their planned release date?
I know 17.0 was 2020 Release Wave 2 and assume 17.5 will be 2021 Release Wave1, but if I check a sandbox in the environment I have to sort out the problem there's no planned update for 17.1 or 2, still sits on 17.0.

Cheers,
Robert

Updates are released on a monthly cadence, with 17.1 planned for later this week. 17.2 should go to production in approximately one month, but as it is the end of year period, there might be some variance on how fast we will update existing environments as to not disrupt standard EOY operations. I will close this as a duplicate of #6233

Was this page helpful?
0 / 5 - 0 ratings