'al/gotodefinition' failed with error: 'Index was outside the bounds of the array.' - Business Central

While moving mouse over the code in vs code we get the error:

Please report this issue to https://github.com/microsoft/al/issues including information on how to reproduce it, if possible.

Processing of message 'al/gotodefinition' failed with error: 'Index was outside the bounds of the array.'


I don't know what is the reason behind this error but it is causing because something is broken in extension.



I believe this will be fixed once this extension is updated. Currently I am using v0.2.4.

Note: I read some where about removing git extension will fix this, but for me it didn't fixed.

Solution/Workaround:

But for now, instead of opening base object files form the sidebar using AL Object Designer button, Open it from the package folder.

Don't open from here:

Open using: Open it from the package folder.

STEP 1: click on the package you want to see the object. For example to see the customer select Microsoft Base Application.

STEP 2: It will open list of objects in the package. Right click on the object you want to see (In Our example Customer). Then press Go to Definition. It will open the object (code).

Object will have the extension of dal (.dal)



Hopefully this fixed your issue.


Reference:

Github

Post a Comment

Thank you for comment, I really appreciate your view.

–>