Open moon6969 opened 4 years ago
Automatically expand is the behavior of VSCode, DA(lua-debug) only provides scope for whether it is expensive. This tag will affect whether VSCode will automatically expand, but it is not decisive.Currently only global and standard are expensive.
Thank you for quick reply.
This issue was raised to vscode for similar issue with Python debugger... In debug mode, arguments are by default collapsed #32199 In particular this comment indicates it is in control of the debugger... https://github.com/Microsoft/vscode/issues/32199#issuecomment-321597173 Here is how it works with Python debugger now:
At first break-point, "Locals" is expanded automatically...
Upon stepping into the function, there are no local variables, but the "Locals" scope is still visible and expanded (v) even though it's empty.
Next step, the y: 'xo' line is automatically visible ✔️
I think the issue is that for Lua, the "Local" scope is removed when empty?
Thanks for your debugger - it's very useful 👍
There are currently seven scopes. If it does not hide empty scopes, there will be a lot of useless information. I think this is not a good idea.
When stepping in debugger, variable scopes (Parameter, Local, etc.) do not automatically expand - even if they were previously expanded... "Local" starts closed... So I open "Local" and Continue (F5)... No locals defined yet... "Local" is closed again :disappointed:
My suggestion is something like this...
It would also be good if the scope stayed visible even if it is empty. Currently if there are no locals, the "Local" scope disappears - I think it should always be visible.