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
728 stars 241 forks source link

Debugger loses the call stack after entering a UI handler in test code #7591

Closed adrogin closed 9 months ago

adrogin commented 9 months ago

When debugging any test which has a UI handler, I can see the correct call stack until the code reaches the handler. After entering the UI code, call stack gets cleared and shows only the current method.

image

For example, it can be reproduced on the codeunit 137023 "SCM Reservation Worksheet", test method GettingDemandAndValidateFields. Call stack disappears when the test invokes the report "Get Demand To Reserve".

If a test calls a UI action which requires a handler, while the handler attribute is missing in the test, the error message shows an empty call stack.

image

Application/platform version Platform 23.0.13804.0 + Application 23.1.13431.13812

AL Language version v12.3.900902

kalberes commented 9 months ago

This is by design. The AL stack is not preserved between these calls.