microsoft / microsoft/debug-adapter-protocol

Lua Variables Indexed section starts at 1 instead of 0

Open
#104 3 comments 0 reactions 2 assignees View on GitHub

@roblourens is already working on this.

Since Nov 16, 2022.

feature-request
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.