microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
722 stars 242 forks source link

Code Coverage shows field triggers without the field name. #7641

Closed spesotskiy closed 5 months ago

spesotskiy commented 6 months ago

1. Describe the bug AL Code Coverage page shows the field triggers without the field name, so it is not possible to find code related to a certain field without looking through AL source file.

2. To Reproduce Steps to reproduce the behavior:

  1. Open page AL Code Coverage (130460, Worksheet), Set Object Id Filter to 36
  2. On Page 130460: Start the coverage
  3. Create a new Sales Order and put any customer code to Sell-to Customer No. field
  4. On Page 130460: Stop the coverage; Refresh.
  5. See the lines of code coverage. Try to find Sell-to Customer No. - OnValidate() line to see if it is all covered.

3. Expected behavior The code coverage line for a field trigger must include the field name, so you can recognize triggers easily., like it is in the standard error call stack string, e.g.

4. Actual behavior All field triggers are listed without field names:

image

5. Versions:

spesotskiy commented 6 months ago

By the way, the line number that is shown in the call stack :

does not correspond with the line numbers in code coverage. This is the number of the line counting from the start of the function/trigger. So, I need to find the number of the function line first, then add 37, to get the line number in the source file and in code coverage table. Also, such a relative number does not help to find which of the overloaded functions is called, as there are no params in the call stack and relative line number cannot help at all. Just put absolute line numbers like in Code Coverage data.

So, the expected behavior section should be:

  1. The field trigger line must include the field name in Code Coverage table. Not Trigger OnValidate(), but Bill-to Customer No. - OnValidate"(Trigger)
  2. There must be absolute line numbers instead of relative in the Call Stack message.
kalberes commented 5 months ago

Sorry Stan. This is a runtime issue.
If you can trigger a Request For Hotfix I am sure it will be considered.

image