Compiler in VS Code get's out of sync
From time to time (happens a couple of time per day for me) the compiler starts complaining about errors that doesn't exists. If I use "Reload Window" the errors goes away. Sometimes the text in the editor also gets corrupted with strange line breaks, but not always. It's seems as the AL Language extensions gets out of sync with the editor in VS Code and needs a new sessions to get back in sync.
I'm on version 2.1.79379 of the extension.
Hi @larswestman,
Thanks for reporting the issue, but could you please provide some more information.
The project you are working in how many .al files are there? Do you have multiple workspaces? Is there some pattern for when it happens?
Hi Thomas
I have approx 400 files in the repo. It's a single root workspace. I've got more folders/workspaces in my c:\repos but that shouldn't have any effect on this I guess.
Its very random. Suddenly I just get compilation errors even though the code is perfectly fine and after a reload it's all fine again. This is a bit annoying btu what's more dangerous is that the code also gets coruppted from time to time and I'm sure this correlates.
I'm not alone on this. I've got colleagues with the same issues. This problem has been around quite long. I've had it for several months.
Yup, happens here as well.
And more here: https://www.yammer.com/dynamicsnavdev/threads/15250068250624
Take a look here. I have these kind of errors several times per day. Here you can see that what I have on the screen is not what the compiler reads. I was about to change the name of the codeunit and got this

As you can see its all over the place....

I can't remember having seen these errors lately.
I must correct myself... This bug is still around.
Is it around like in the newly released 4.0 version?
Hi @larswestman, can you try to see if this still reproduces on the latest developer preview?
This issue has been closed because it has not had recent activity. Please open a new issue if you believe this has not been resolved and reference the current issue.