AL icon indicating copy to clipboard operation
AL copied to clipboard

Debugger crashes at random points

Open Devaim1 opened this issue 1 year ago • 3 comments

1. Describe the bug Upon debugging and at any further indeterminate point, a crash may occur. Debugger will say: An error occurred while writing to logger(s). (Destination is too short. (Parameter 'destination'))

The debug console does not say anything out of the ordinary.

2. To Reproduce I am debug/publishing an extension to a Sandbox. Unfortunately, no patterns have been identified for reproduction. It is possible that longer, more complex code will result in a lengthier debug session, and the crash ocurring.

3. Expected behavior Uninterrupted debugging session until user error or completion.

4. Actual behavior Debugger may or may not crash at any given moment. Debugger, showing unexpected end of code execution Subsequently the debugger shuts down. Debugger session ended

5. Versions:

  • AL Language: 13.0.1007491
  • Visual Studio Code: 1.89.0 (user setup)
  • Business Central: ES Business Central 23.5 (Platform 23.0.19170.0 + Application 23.5.16502.16589)
  • List of Visual Studio Code extensions that you have installed: Copilot (and chat), AL Language Extension, AL Language Tools, AL Test Runner, AZ AL Dev Tools/AL Code Outline, Docker, Git Graph, GitLens, PowerShell, TODO Highlight, waldo's CRS AL Language Extension.

Final Checklist

Please remember to do the following:

  • [???] Search the issue repository to ensure you are reporting a new issue

  • [???] Reproduce the issue after disabling all extensions except the AL Language extension

  • [???] Simplify your code around the issue to better isolate the problem

Internal work item: AB#535431

Devaim1 avatar May 07 '24 13:05 Devaim1

We'll need more logs to be able to figure out what is going on. Can you do the following?

  1. In your VSCode settings.json, set "al.editorServicesLogLevel": "Verbose"

  2. Reproduce the scenario Under the path C:\Users<username>.vscode\extensions\ms-dynamics-smb.al-\bin\win32, collect the debuggerservices.log files. Important: These files might contain PII, so please do not attach them to this issue.

  3. Share it somehow (again, the file may contain personal information, so be aware about the sharing). (if you are on yammer, you can add the link there in a private message)

  4. Disable the "al.editorServicesLogLevel" since the file can grow really large.

Thanks!

kalberes avatar May 13 '24 07:05 kalberes

Thank you for taking the time to review this issue. Caught it second try, should be near the end. Please request access and I will grant it to you ASAP. If whatever account you use isn't similar to the one I am talking to currently, please identify your request here. https://drive.google.com/file/d/1CZT0E60M4suKdEhYdBx9HizrkNe_kjd2/view?usp=sharing

Devaim1 avatar May 13 '24 14:05 Devaim1

tx

kalberes avatar May 16 '24 14:05 kalberes

What is the status of issue? I'm having similar problems. Sometimes I get this 'Destination is too short' error, but mostly it just stops without any visible reason. I'm using the latest published AL Language extension (13.0.1027618) and trying to debug an online sandbox (24.0) session. This is becoming rather critical as I'm not able to solve a problem in a customer modification because of constant dropping.

mikorolkdga avatar Jun 03 '24 09:06 mikorolkdga

yeah me too

fachrulrzy avatar Jun 08 '24 17:06 fachrulrzy

Having troubles to live debug through VS Code (dev extension) too, with the same error. It only happens (for me) when the global / local variables are unfolded in the sidebar (so that you can't see their values).

SaschaM-Dev avatar Jun 13 '24 18:06 SaschaM-Dev

The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 25.0.20517.0 and VS Code Extension Version 14.0.1040866.

If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo

For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://freddysblog.com/2020/06/25/working-with-artifacts/

JesperSchulz avatar Jun 24 '24 12:06 JesperSchulz