microsoft / microsoft/debug-adapter-protocol
Lua Variables Indexed section starts at 1 instead of 0
@roblourens is already working on this.
Since Nov 16, 2022.
- Dominant language
- HTML
- Stars
- 1.8k
- Forks
- 173
- Avg merge
- 7d 7h
- Merged PRs (30d)
- 2
Description
Lua tables are both array and hashtable, but the array part is contiguous integer indexes starting at 1, and 0 is just another hashtable key in the hashtable part. This requires me to fudge the boundaries of paged variables requests, where DAP and tools currently assume starting at 0. I currently report indexedVariables = length+1 of an array and just omit an entry for 0 in the Indexed section, but this causes some annoyances in the UI, which still indicates that the first page starts as 0..99. It would be great if I could somehow indicate that Indexed variables in my environment start from 1 and have the dev tool adjust its UI and paged requests to me accordingly.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.