Automatic variable "Return Value" missing in VSCode Debugger Variables -> Locals
1. Describe the bug At some point back in time, the AL Language extension provided an automatic variable called "Return Value" in Variables -> Locals, every time the procedure end was hit by the debugger.
However, this variable is missing since a longer time (see screenshot).
2. To Reproduce
- Debug an app, a procedure with return value,
- go single step until end of procedure,
- Review the Variables -> Locals section
procedure GetValue(): Text
begin
exit('Any Value');
end; // hitting this should show "Return Value" with content 'Any Value'
3. Expected behavior Hitting procedure end with the debugger should show "Return Value" with content 'Any Value' in Variables -> Locals.
4. Actual behavior "Return Value" is not shown in Variables -> Locals when hitting procedure end in debugger.
5. Versions:
- AL Language: 17.0.1825603
- Visual Studio Code: 1.104.3
- Business Central: 27.0
- Operating System:
- [X] Windows
- [ ] Linux
- [ ] MacOS
Internal work item: AB#611557
The same here. Even if you name the return value, i.e. procedure GetValue()returnValue: Text begin retrnValue := 'Any Value'; end;
You can't see the returnValue value. Nor in the debugger panel, nor in the bottom panel, nor hovering over the variable.
The same here. Even if you name the return value, i.e. procedure GetValue()returnValue: Text begin retrnValue := 'Any Value'; end;
You can't see the returnValue value. Nor in the debugger panel, nor in the bottom panel, nor hovering over the variable.
This is related to #8061 and should be already resolved?
This is related to #8061 and should be already resolved?
It is not resolved in the version I mentioned above.
The same here. Even if you name the return value, i.e. procedure GetValue()returnValue: Text begin retrnValue := 'Any Value'; end; You can't see the returnValue value. Nor in the debugger panel, nor in the bottom panel, nor hovering over the variable.
This is related to #8061 and should be already resolved?
Was this resolved also for versions 25 and 26 or is it just for the 27? Because I can't see it neither in 25 and 26 and I don't have 27 available to test
It's not per BC version, but your AL Language version (which I'm assuming is the latest one? If we're unlucky, it's even solved in the Pre-Release version only), and often but not always in combination with the runtime version as per app.json.
@NKarolak is correct that, generally speaking, the main factor is the version of the AL Language extension for VSCode. However, this specific fix did require a change in the Business Central platform, so the availability of the fix in #8061 does somewhat depend on which version of BC you are targeting.
That said, this ticket mentions VSCode extension 17.0.1825603 and BC 27.0, which is a combination that should have been fixed via work done for #8061. I will raise this internally to see if we missed something when fixing the previous bug.
The named return variable should work and show up in the locals from 27. I'll investigate if there is an issue with it.